Fix import po file to convert res_id 0 into None
issue2531
This commit is contained in:
1 parent
f90818931c
commit
8eaeecc12b
1 file changed
+7
-4
@@ -515,10 +515,13 @@ class Translation(ModelSQL, ModelView, Cacheable):
|
||||
res_id = model_data.db_id
|
||||
noupdate = model_data.noupdate
|
||||
|
||||
try:
|
||||
res_id = int(res_id)
|
||||
except ValueError:
|
||||
continue
|
||||
if res_id:
|
||||
try:
|
||||
res_id = int(res_id)
|
||||
except ValueError:
|
||||
continue
|
||||
if not res_id:
|
||||
res_id = None
|
||||
|
||||
if ttype in ('odt', 'view', 'wizard_button', 'selection', 'error'):
|
||||
key = (name, res_id, ttype, src)
|
||||
|
||||
Reference in new issue
Block a user