Commit ba6c1de5 authored by Robert's avatar Robert

Fixed #530: do not create new poll on update

parent 1a0d8a7e
Pipeline #1205 failed with stage
in 1 minute and 2 seconds
......@@ -24,8 +24,9 @@ class OptionMixin:
def save_content_relations(self, commit):
# FIXME: remove when django bug #28988 is fixed
self.instance.container.poll = models.WorkaroundPoll.objects.create()
self.instance.container.save()
if not self.instance.container.poll:
self.instance.container.poll = models.WorkaroundPoll.objects.create()
self.instance.container.save()
for form in self.options.forms:
form.instance.poll = self.instance.container.poll
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment