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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user