Fix translation_import for empty translation_ids
This commit is contained in:
1 parent
ae3e318457
commit
62c35ebafc
1 file changed
+6
-5
@@ -420,12 +420,13 @@ class Translation(OSV, Cacheable):
|
||||
}, context=ctx)
|
||||
translation_ids += ids
|
||||
|
||||
cursor.execute('DELETE FROM ir_translation ' \
|
||||
'WHERE module = %s ' \
|
||||
'AND lang = %s ' \
|
||||
'AND id NOT IN ' \
|
||||
if translation_ids:
|
||||
cursor.execute('DELETE FROM ir_translation ' \
|
||||
'WHERE module = %s ' \
|
||||
'AND lang = %s ' \
|
||||
'AND id NOT IN ' \
|
||||
'(' + ','.join(['%s' for x in translation_ids]) + ')',
|
||||
(module, lang) + tuple(translation_ids))
|
||||
(module, lang) + tuple(translation_ids))
|
||||
return len(translation_ids)
|
||||
|
||||
def translation_export(self, cursor, user, lang, module, context=None):
|
||||
|
||||
Reference in new issue
Block a user