Only mark a field as changed if the value has changed (#258)
This commit is contained in:
parent
8f05896bc9
commit
97a98f0045
1 changed files with 8 additions and 7 deletions
|
|
@ -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()
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue