check the list:reference contains integers

This commit is contained in:
Massimo Di Pierro
2012-02-27 08:52:41 -06:00
parent f36915522d
commit 65dc2026e0
2 changed files with 7 additions and 3 deletions
+1 -1
View File
@@ -1 +1 @@
Version 1.99.4 (2012-02-27 08:08:05) stable
Version 1.99.4 (2012-02-27 08:52:23) stable
+6 -2
View File
@@ -1399,8 +1399,12 @@ class BaseAdapter(ConnectionPool):
if fieldtype.startswith('list:'):
if not obj:
obj = []
if not isinstance(obj, (list, tuple)):
obj = [obj]
elif not isinstance(obj, (list, tuple)):
obj = [int(obj)]
elif fieldtype.startswith('list:string'):
obj = [str(item) for item in obj]
else:
obj = [int(item) for item in obj]
if isinstance(obj, (list, tuple)):
obj = bar_encode(obj)
if obj is None: