1
0
mirror of https://github.com/django/django.git synced 2024-12-24 18:16:19 +00:00

Include swapped apps in autodetector state

This commit is contained in:
Andrew Godwin 2014-06-22 13:00:49 -07:00
parent b30d32ff24
commit 8b878c7a64

View File

@ -100,7 +100,7 @@ class ProjectState(object):
def from_apps(cls, apps):
"Takes in an Apps and returns a ProjectState matching it"
app_models = {}
for model in apps.get_models():
for model in apps.get_models(include_swapped=True):
model_state = ModelState.from_model(model)
app_models[(model_state.app_label, model_state.name.lower())] = model_state
return cls(app_models)