Fixed a versioning bug in the property editor

This commit is contained in:
Raphael Michel
2015-06-23 21:18:04 +02:00
parent 6ec516a83a
commit 76b0189972
2 changed files with 2 additions and 3 deletions
+1 -2
View File
@@ -271,8 +271,7 @@ class PropertyUpdate(EventPermissionRequiredMixin, UpdateView):
f.instance.pk = None
for i, f in enumerate(formset.ordered_forms):
if f.instance.pk is not None:
f.instance = f.instance.clone()
f.save(commit=False)
f.instance.position = i
f.instance.save()
+1 -1
View File
@@ -147,7 +147,7 @@ class PropertiesTest(ItemFormTest):
assert str(PropertyValue.objects.current.get(identity=p2.identity).value) == 'red'
assert str(PropertyValue.objects.as_of(t1).get(identity=p1.identity).value) == 'S'
assert not PropertyValue.objects.current.filter(identity=p1.identity).exists()
assert Property.objects.as_of(t1).get(identity=c.identity).name == 'Size'
assert str(Property.objects.as_of(t1).get(identity=c.identity).name) == 'Size'
def test_delete(self):
c = Property.objects.create(event=self.event1, name="Size")