summaryrefslogtreecommitdiff
path: root/django/db/models/fields
diff options
context:
space:
mode:
Diffstat (limited to 'django/db/models/fields')
-rw-r--r--django/db/models/fields/related.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/django/db/models/fields/related.py b/django/db/models/fields/related.py
index 0218c8c693..d6d84e1b23 100644
--- a/django/db/models/fields/related.py
+++ b/django/db/models/fields/related.py
@@ -68,7 +68,7 @@ def add_lazy_relation(cls, field, relation, operation):
# string right away. If get_model returns None, it means that the related
# model isn't loaded yet, so we need to pend the relation until the class
# is prepared.
- model = cls._meta.app_cache.has_model(app_label, model_name)
+ model = cls._meta.app_cache.get_registered_model(app_label, model_name)
if model:
operation(field, model, cls)
else: