Skip to content

Commit

Permalink
Revert change to stop automatically calling callable attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
rowanseymour committed Jun 6, 2017
1 parent 06e571b commit bacd2be
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions smartmin/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,10 @@ def lookup_obj_attribute(self, obj, field):
# next up is the object itself
obj_field = getattr(obj, curr_field, None)

# if it is callable, do so
if obj_field and getattr(obj_field, '__call__', None):
obj_field = obj_field()

if obj_field and rest:
return self.lookup_obj_attribute(obj_field, rest)
else:
Expand Down

0 comments on commit bacd2be

Please sign in to comment.