summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorSimon Charette <charette.s@gmail.com>2015-12-14 01:20:10 -0500
committerSimon Charette <charette.s@gmail.com>2015-12-15 14:55:05 -0500
commit4b02b433b75d457552ee37e519afe6c83f261d44 (patch)
tree449b9c770723fd89dfd0f0bb7506d91d9e9bf076 /django
parentc0c2c7ecd6780b1207b18d96a60c807dbb98eb81 (diff)
[1.8.x] 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. Backport of c4e372aaf467ae41315cfe56a718a80469fc5318 from master
Diffstat (limited to 'django')
-rw-r--r--django/db/migrations/operations/models.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/db/migrations/operations/models.py b/django/db/migrations/operations/models.py
index c0eb92a0ef..fa4da99034 100644
--- a/django/db/migrations/operations/models.py
+++ b/django/db/migrations/operations/models.py
@@ -563,6 +563,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