mirror of
https://github.com/encode/django-rest-framework.git
synced 2025-08-05 13:00:12 +03:00
Stick to coding style
This commit is contained in:
parent
bfcbe258ab
commit
8641cd68bb
|
@ -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)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user