Commit b915c1d4 by Oscar Vilaplana

Made field label optional in OPTIONS

parent 42b61ffc
......@@ -136,11 +136,10 @@ def humanize_field(field):
humanized = {
'type': humanize_field_type(field.__class__),
'required': getattr(field, 'required', False),
'label': getattr(field, 'label', None),
}
optional_attrs = ['read_only', 'help_text']
optional_attrs = ['read_only', 'help_text', 'label']
for attr in optional_attrs:
if hasattr(field, attr):
if getattr(field, attr, None) is not None:
humanized[attr] = getattr(field, attr)
return humanized
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment