From dcc287a2946fda1e8c76ef0d1129789796028dab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Sun, 3 May 2009 14:04:02 +0200 Subject: [PATCH] Improve convertion of id into xml id for translation export --- trytond/ir/translation.py | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/trytond/ir/translation.py b/trytond/ir/translation.py index afe6e8a1f6..21af6c4e75 100644 --- a/trytond/ir/translation.py +++ b/trytond/ir/translation.py @@ -1,4 +1,5 @@ -#This file is part of Tryton. The COPYRIGHT file at the top level of this repository contains the full copyright notices and license terms. +#This file is part of Tryton. The COPYRIGHT file at the top level of +#this repository contains the full copyright notices and license terms. "Translation" import base64 try: @@ -511,12 +512,8 @@ class Translation(ModelSQL, ModelView, Cacheable): model = translation.name.split(',')[0] if model in db_id2fs_id: res_id = db_id2fs_id[model].get(res_id) - try: - val = int(res_id) - if val != 0: - continue - except (ValueError, TypeError): - pass + else: + break row.append(res_id) elif field == 'fuzzy': row.append(int(translation[field]))