summaryrefslogtreecommitdiff
path: root/django/core/serializers/python.py
diff options
context:
space:
mode:
authorAymeric Augustin <aymeric.augustin@m4x.org>2014-01-26 12:57:08 +0100
committerAymeric Augustin <aymeric.augustin@m4x.org>2014-01-26 13:08:05 +0100
commitf901b4d6c869f4cfb4fc28a861c481f28e46bb3f (patch)
treeda6526f8a137e3cb0200f58d88cc23243127fb1c /django/core/serializers/python.py
parent3c47786cb91617b3757e57b6bfeda06ef14e561a (diff)
downloaddjango-f901b4d6c869f4cfb4fc28a861c481f28e46bb3f.tar.gz
Took advantage of the new get_model API. Refs #21702.
Diffstat (limited to 'django/core/serializers/python.py')
-rw-r--r--django/core/serializers/python.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/django/core/serializers/python.py b/django/core/serializers/python.py
index 3d14a1b509..249dc5a054 100644
--- a/django/core/serializers/python.py
+++ b/django/core/serializers/python.py
@@ -153,7 +153,6 @@ def _get_model(model_identifier):
Helper to look up a model from an "app_label.model_name" string.
"""
try:
- Model = apps.get_model(*model_identifier.split("."))
+ return apps.get_model(model_identifier)
except (LookupError, TypeError):
raise base.DeserializationError("Invalid model identifier: '%s'" % model_identifier)
- return Model