mirror of
https://github.com/pretix/pretix.git
synced 2026-08-12 11:07:02 +00:00
Fixed a versioning bug in the property editor
This commit is contained in:
@@ -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()
|
||||
|
||||
|
||||
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user