Test key 'states' before use it for issue123
This commit is contained in:
1 parent
24d32d5da1
commit
3f75d1b100
1 file changed
+2
-1
+2
-1
@@ -1755,7 +1755,8 @@ class ORM(object):
|
||||
res[field][arg] = getattr(self._columns[field], arg)
|
||||
if not write_access:
|
||||
res[field]['readonly'] = True
|
||||
if 'readonly' in res[field]['states']:
|
||||
if res[field].get('states') and \
|
||||
'readonly' in res[field]['states']:
|
||||
res[field]['states'] = res[field]['states'].copy()
|
||||
del res[field]['states']['readonly']
|
||||
for arg in ('digits', 'invisible'):
|
||||
|
||||
Reference in new issue
Block a user