Skip to content

Commit

Permalink
Switched from using django.db.models.loading.get_model to using djang…
Browse files Browse the repository at this point in the history
…o.apps.apps.get_model
  • Loading branch information
epicserve committed Feb 10, 2016
1 parent 02d6b98 commit 337cca5
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions categories/registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,10 @@ def _process_registry(registry, call_func):
Given a dictionary, and a registration function, process the registry
"""
from django.core.exceptions import ImproperlyConfigured
from django.db.models.loading import get_model
from django.apps import apps

for key, value in list(registry.items()):
model = get_model(*key.split('.'))
model = apps.get_model(*key.split('.'))
if model is None:
raise ImproperlyConfigured(_('%(key)s is not a model') % {'key': key})
if isinstance(value, (tuple, list)):
Expand Down

0 comments on commit 337cca5

Please sign in to comment.