Commit ee927519 authored by Janez K's avatar Janez K
Browse files

bugfix when importing options

parent 528fec6b
...@@ -1059,10 +1059,10 @@ class Input(models.Model): ...@@ -1059,10 +1059,10 @@ class Input(models.Model):
self.order = json_data['order'] self.order = json_data['order']
self.save() self.save()
input_conversion[json_data['pk']]=self.pk input_conversion[json_data['pk']]=self.pk
for o in json_data['options']: for option in json_data['options']:
o = Option() o = Option()
o.input = self o.input = self
o.import_from_json(json_data,input_conversion,output_conversion) o.import_from_json(option,input_conversion,output_conversion)
o.save() o.save()
if json_data['outer_output']: if json_data['outer_output']:
self.outer_output = Output.objects.get(pk=output_conversion[json_data['outer_output']]) self.outer_output = Output.objects.get(pk=output_conversion[json_data['outer_output']])
......
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