Only mark a field as changed if the value has changed (#258)

This commit is contained in:
Ross Lawley 2013-04-15 07:52:04 +00:00
parent 8f05896bc9
commit 97a98f0045

View File

@ -185,8 +185,9 @@ class FieldTest(unittest.TestCase):
# Migrate the data # Migrate the data
for g in Group.objects(): for g in Group.objects():
g.author = g.author # Explicitly mark as changed so resets
g.members = g.members g._mark_as_changed('author')
g._mark_as_changed('members')
g.save() g.save()
group = Group.objects.first() group = Group.objects.first()