diff options
| author | Tom Christie | 2014-11-27 08:10:52 +0000 |
|---|---|---|
| committer | Tom Christie | 2014-11-27 08:10:52 +0000 |
| commit | 1ffe4857ec51c3b6c5a90059cca0fb82820d759e (patch) | |
| tree | f160264815d6b339cea488f057fe33b6245bee1e /rest_framework/fields.py | |
| parent | 2647e1aaaadfc2cfd947c633399dca1060c17401 (diff) | |
| download | django-rest-framework-1ffe4857ec51c3b6c5a90059cca0fb82820d759e.tar.bz2 | |
Support callable attributes in dotted source. Closes #2142.
Diffstat (limited to 'rest_framework/fields.py')
| -rw-r--r-- | rest_framework/fields.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/fields.py b/rest_framework/fields.py index 3cf34886..ca770f77 100644 --- a/rest_framework/fields.py +++ b/rest_framework/fields.py @@ -68,8 +68,8 @@ def get_attribute(instance, attrs): return instance[attr] except (KeyError, TypeError, AttributeError): raise exc - if is_simple_callable(instance): - return instance() + if is_simple_callable(instance): + return instance() return instance |
