diff options
| author | Tom Christie | 2014-10-08 16:09:37 +0100 |
|---|---|---|
| committer | Tom Christie | 2014-10-08 16:09:37 +0100 |
| commit | 14ae52a24e93063f77c6010269bf9cd3316627fe (patch) | |
| tree | c87bede7775b8eaf8fa33ff9e8028575a47fe26c /rest_framework/utils/model_meta.py | |
| parent | 28f3b314f12cbff33c55602c2c5f5f5cce956171 (diff) | |
| download | django-rest-framework-14ae52a24e93063f77c6010269bf9cd3316627fe.tar.bz2 | |
More gradual deprecation
Diffstat (limited to 'rest_framework/utils/model_meta.py')
| -rw-r--r-- | rest_framework/utils/model_meta.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/rest_framework/utils/model_meta.py b/rest_framework/utils/model_meta.py index b6c41174..7a95bcdd 100644 --- a/rest_framework/utils/model_meta.py +++ b/rest_framework/utils/model_meta.py @@ -107,8 +107,8 @@ def get_field_info(model): related=relation.model, to_many=True, has_through_model=( - hasattr(relation.field.rel, 'through') and - not relation.field.rel.through._meta.auto_created + (getattr(relation.field.rel, 'through', None) is not None) + and not relation.field.rel.through._meta.auto_created ) ) |
