Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Prevent operation pollution by later operations of fields

  • Loading branch information...
commit 1fe941adb0570a58cc5d2eb372611ade8d0e8776 1 parent aa12ea0
@andrewgodwin andrewgodwin authored
Showing with 7 additions and 1 deletion.
  1. +7 −1 django/db/migrations/operations/models.py
View
8 django/db/migrations/operations/models.py
@@ -21,7 +21,13 @@ def __init__(self, name, fields, options=None, bases=None):
self.bases = bases or (models.Model,)
def state_forwards(self, app_label, state):
- state.models[app_label, self.name.lower()] = ModelState(app_label, self.name, self.fields, self.options, self.bases)
+ state.models[app_label, self.name.lower()] = ModelState(
+ app_label,
+ self.name,
+ list(self.fields),
+ dict(self.options),
+ tuple(self.bases),
+ )
def database_forwards(self, app_label, schema_editor, from_state, to_state):
apps = to_state.render()
Please sign in to comment.
Something went wrong with that request. Please try again.