Kaydet (Commit) 8b878c7a authored tarafından Andrew Godwin's avatar Andrew Godwin

Include swapped apps in autodetector state

üst b30d32ff
...@@ -100,7 +100,7 @@ class ProjectState(object): ...@@ -100,7 +100,7 @@ class ProjectState(object):
def from_apps(cls, apps): def from_apps(cls, apps):
"Takes in an Apps and returns a ProjectState matching it" "Takes in an Apps and returns a ProjectState matching it"
app_models = {} app_models = {}
for model in apps.get_models(): for model in apps.get_models(include_swapped=True):
model_state = ModelState.from_model(model) model_state = ModelState.from_model(model)
app_models[(model_state.app_label, model_state.name.lower())] = model_state app_models[(model_state.app_label, model_state.name.lower())] = model_state
return cls(app_models) return cls(app_models)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment