Split line and added indentation for better readability.
This commit is contained in:
parent
94b5bc361a
commit
f46ef750b9
|
@ -268,8 +268,10 @@ def lookup_field(name, obj, model_admin=None):
|
|||
if callable(name):
|
||||
attr = name
|
||||
value = attr(obj)
|
||||
elif (model_admin is not None and hasattr(model_admin, name) and
|
||||
not name == '__str__' and not name == '__unicode__'):
|
||||
elif (model_admin is not None and
|
||||
hasattr(model_admin, name) and
|
||||
not name == '__str__' and
|
||||
not name == '__unicode__'):
|
||||
attr = getattr(model_admin, name)
|
||||
value = attr(obj)
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue