Skip to content

Commit

Permalink
better _structure
Browse files Browse the repository at this point in the history
  • Loading branch information
mdipierro committed Nov 11, 2017
1 parent 8eca728 commit b34b8be
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pydal/objects.py
Original file line number Diff line number Diff line change
Expand Up @@ -379,7 +379,8 @@ def fields(self):
return self._fields

def _structure(self):
keys = ['name','type','writable','listable','searchable','regex','options','default']
keys = ['name','type','writable','listable','searchable','regex','options',
'default','label','unique','notnull','required']
def noncallable(obj): return obj if not callable(obj) else None
return [{key: noncallable(getattr(field, key)) for key in keys}
for field in self if field.readable and not field.type=='password']
Expand Down

0 comments on commit b34b8be

Please sign in to comment.