summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorAndrew Godwin <andrew@aeracode.org>2012-09-17 19:57:23 +0100
committerAndrew Godwin <andrew@aeracode.org>2012-09-17 19:57:23 +0100
commitdbf8b93c527733fb5e3ea101a67bd94db745888e (patch)
tree67fbf7aa2776f6e434a2ebfe674e9f2a5bdc54b9 /django
parent3ffbfe4abcc9380fbaeeb7a370109775166b23d8 (diff)
Fix app loading/test interaction
Diffstat (limited to 'django')
-rw-r--r--django/db/models/loading.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/django/db/models/loading.py b/django/db/models/loading.py
index e0d943853b..6f7a50dcf8 100644
--- a/django/db/models/loading.py
+++ b/django/db/models/loading.py
@@ -251,7 +251,7 @@ class AppCache(object):
"""
return {
"app_store": SortedDict(self.app_store.items()),
- "app_labels": dict(self.app_errors.items()),
+ "app_labels": dict(self.app_labels.items()),
"app_models": SortedDict(self.app_models.items()),
"app_errors": dict(self.app_errors.items()),
}
@@ -264,6 +264,7 @@ class AppCache(object):
self.app_labels = state['app_labels']
self.app_models = state['app_models']
self.app_errors = state['app_errors']
+ self._get_models_cache.clear()
def temporary_state(self):
"Returns a context manager that restores the state on exit"