We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9164eff commit ce29aa8Copy full SHA for ce29aa8
simple_history/models.py
@@ -7,6 +7,7 @@
7
except ImportError:
8
apps = None
9
from django.db import models, router
10
+from django.db.models import loading
11
from django.db.models.fields.related import RelatedField
12
from django.db.models.related import RelatedObject
13
from django.conf import settings
@@ -99,7 +100,7 @@ def create_history_model(self, model):
99
100
elif app_module != self.module:
101
if apps is None:
102
# has meta options with app_label
- app = models.get_app(model._meta.app_label)
103
+ app = loading.get_app(model._meta.app_label)
104
attrs['__module__'] = app.__name__ # full dotted name
105
else:
106
# Abuse an internal API because the app registry is loading.
0 commit comments