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 12:22:59 -0500
commitc4e372aaf467ae41315cfe56a718a80469fc5318 (patch)
tree2c88abbb33c536c4a5f94aecf15756265783d7ce /django
parentb7fdd60d85ee94df444369be1b2c778cda44a0c2 (diff)
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.
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 2855107e0e..eabffa1b7d 100644
--- a/django/db/migrations/operations/models.py
+++ b/django/db/migrations/operations/models.py
@@ -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