Stick to coding style

This commit is contained in:
Johan Charpentier 2015-12-24 15:27:02 +01:00
parent bfcbe258ab
commit 8641cd68bb

View File

@ -131,7 +131,7 @@ class SimpleMetadata(BaseMetadata):
for attr in attrs: for attr in attrs:
value = getattr(field, attr, None) value = getattr(field, attr, None)
if value is not None and value != '' and value != empty: if value is not None and value != '' and value != empty:
if hasattr(value, '__call__'): if callable(value):
value.set_context(field) value.set_context(field)
value = value() value = value()
field_info[attr] = force_text(value, strings_only=True) field_info[attr] = force_text(value, strings_only=True)