From f7bb77720a4fcdf1360848291ed9299198812bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 17 Mar 2008 13:01:13 +0100 Subject: [PATCH] Copy vals before modify it and fix typo for offset string --- trytond/osv/orm.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/trytond/osv/orm.py b/trytond/osv/orm.py index e4468f8d31..f3fd0e2fad 100644 --- a/trytond/osv/orm.py +++ b/trytond/osv/orm.py @@ -1302,6 +1302,9 @@ class ORM(object): context = {} if not ids: return True + + vals = vals.copy() + if isinstance(ids, (int, long)): ids = [ids] delta = context.get('read_delta', False) @@ -2258,7 +2261,7 @@ class ORM(object): limit_str = limit and (type(limit) in (float, int, long))\ and ' LIMIT %d' % limit or '' - offset_str = offset and (type(limit) in (float, int, long))\ + offset_str = offset and (type(offset) in (float, int, long))\ and ' OFFSET %d' % offset or ''