Permalink
Browse files

Prevent operation pollution by later operations of fields

  • Loading branch information...
1 parent aa12ea0 commit 1fe941adb0570a58cc5d2eb372611ade8d0e8776 @andrewgodwin andrewgodwin committed Jun 6, 2014
Showing with 7 additions and 1 deletion.
  1. +7 −1 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()

0 comments on commit 1fe941a

Please sign in to comment.