Commit c02d2311 authored by Janez K's avatar Janez K

fixed error with multiple UUIDs

parent 796ebe50
......@@ -421,19 +421,19 @@ class AbstractWidget(models.Model):
def set_uid(self,commit=False):
import uuid
self.uid = uuid.uuid4()
self.uid = str(uuid.uuid4())
if commit:
self.save()
for i in self.inputs.all():
i.uid = uuid.uuid4()
i.uid = str(uuid.uuid4())
if commit:
i.save()
for option in i.options.all():
option.uid = uuid.uuid4()
option.uid = str(uuid.uuid4())
if commit:
option.save()
for o in self.outputs.all():
o.uid = uuid.uuid4()
o.uid = str(uuid.uuid4())
if commit:
o.save()
......
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