From a35f91569da480e52c75e31748221fbc2d852c50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 13 Oct 2008 13:33:00 +0200 Subject: [PATCH] Ensure that ref_id is an integer in Reference fields --- trytond/osv/fields.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/trytond/osv/fields.py b/trytond/osv/fields.py index 9a5029dfd7..2e934dbf61 100644 --- a/trytond/osv/fields.py +++ b/trytond/osv/fields.py @@ -141,6 +141,10 @@ class Reference(Column): ref_id = eval(ref_id) except: pass + try: + ref_id = int(ref_id) + except: + continue if ref_id \ and not ref_obj.search(cursor, user, [ ('id', '=', ref_id),