fix changed_objects_count

This commit is contained in:
Laura Klünder 2017-06-29 14:27:42 +02:00
parent 51f589835b
commit 4e3da477e5

View file

@ -261,9 +261,8 @@ class ChangeSet(models.Model):
changed_locationslug_pks.update(objects.keys())
count += len(objects)
changed_locationslug_pks ^= set(obj.updated_fields['target']
for obj in self.changed_objects.get(LocationRedirect, {}).values())
count += len(changed_locationslug_pks)
count += len(set(obj.updated_fields['target']
for obj in self.changed_objects.get(LocationRedirect, {}).values()) - changed_locationslug_pks)
return count
@property