Commit de882864 authored by Janez K's avatar Janez K

bugfix

parent 7db8d188
......@@ -52,7 +52,7 @@ class Category(models.Model):
def update_uid(self):
import uuid
if self.uid == '' or self.uid is None:
self.uid = uuid.uuid4()
self.uid = str(uuid.uuid4())
self.save()
if self.parent:
self.parent.update_uid()
......@@ -490,16 +490,16 @@ class AbstractWidget(models.Model):
def update_uid(self):
import uuid
if self.uid == '' or self.uid is None:
self.uid = uuid.uuid4()
self.uid = str(uuid.uuid4())
self.save()
for i in self.inputs.filter(uid=''):
i.uid = uuid.uuid4()
i.uid = str(uuid.uuid4())
i.save()
for option in i.options.filter(uid=''):
option.uid = uuid.uuid4()
option.uid = str(uuid.uuid4())
option.save()
for o in self.outputs.filter(uid=''):
o.uid = uuid.uuid4()
o.uid = str(uuid.uuid4())
o.save()
self.category.update_uid()
......
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