1
0
mirror of https://github.com/django/django.git synced 2025-10-27 07:36:08 +00:00

Fixed #25852 -- Made sure AlterModelManager forces a reload of its model state.

Thanks to Geoffrey Sechter and the Django NYC group for the report and Markus
for the review.
This commit is contained in:
Simon Charette
2015-12-14 01:20:10 -05:00
parent b7fdd60d85
commit c4e372aaf4
4 changed files with 12 additions and 0 deletions

View File

@@ -590,6 +590,7 @@ class AlterModelManagers(Operation):
def state_forwards(self, app_label, state):
model_state = state.models[app_label, self.name_lower]
model_state.managers = list(self.managers)
state.reload_model(app_label, self.name_lower)
def database_forwards(self, app_label, schema_editor, from_state, to_state):
pass