[FIX] error when getting size of a selection field

bzr revid: chs@tinyerp.com-20100112155822-1sidqjavc7gh8m3f
This commit is contained in:
Christophe Simonis 2010-01-12 16:58:22 +01:00
parent e7896ddd46
commit 3816dadb22
1 changed files with 1 additions and 1 deletions

View File

@ -304,7 +304,7 @@ def get_pg_type(f):
elif isinstance(f.selection, list) and isinstance(f.selection[0][0], int):
f_size = -1
else:
f_size = getattr(f, 'size', 16)
f_size = getattr(f, 'size', None) or 16
if f_size == -1:
f_type = ('int4', 'INTEGER')