Commit a51e0e62 authored by Janez K's avatar Janez K

fixed the way inputs and outputs work on subprocesses

parent 0332ccc9
...@@ -659,17 +659,18 @@ def add_input(request): ...@@ -659,17 +659,18 @@ def add_input(request):
widget.name = 'Input' widget.name = 'Input'
widget.type = 'input' widget.type = 'input'
widget.save() widget.save()
variable_name = 'Input'+str(widget.pk)
output = Output() output = Output()
output.name = 'Input' output.name = 'Input'
output.short_name = 'inp' output.short_name = 'inp'
output.variable = 'Input' output.variable = variable_name
output.widget = widget output.widget = widget
output.save() output.save()
input = Input() input = Input()
input.widget = workflow.widget input.widget = workflow.widget
input.name = 'Input' input.name = 'Input'
input.short_name = 'inp' input.short_name = 'inp'
input.variable = 'Input' input.variable = variable_name
input.inner_output = output input.inner_output = output
input.save() input.save()
output.outer_input = input output.outer_input = input
...@@ -705,17 +706,18 @@ def add_output(request): ...@@ -705,17 +706,18 @@ def add_output(request):
widget.name = 'Output' widget.name = 'Output'
widget.type = 'output' widget.type = 'output'
widget.save() widget.save()
variable_name = 'Output'+str(widget.pk)
input = Input() input = Input()
input.name = 'Output' input.name = 'Output'
input.short_name = 'out' input.short_name = 'out'
input.variable = 'Output' input.variable = variable_name
input.widget = widget input.widget = widget
input.save() input.save()
output = Output() output = Output()
output.widget = workflow.widget output.widget = workflow.widget
output.name = 'Output' output.name = 'Output'
output.short_name = 'out' output.short_name = 'out'
output.variable = 'Output' output.variable = variable_name
output.inner_input = input output.inner_input = input
output.save() output.save()
input.outer_output = output input.outer_output = output
...@@ -1175,7 +1177,7 @@ def widget_results(request): ...@@ -1175,7 +1177,7 @@ def widget_results(request):
return s return s
if request.is_ajax() or DEBUG: if request.is_ajax() or DEBUG:
w = get_object_or_404(Widget, pk=request.POST['widget_id']) w = get_object_or_404(Widget, pk=request.POST['widget_id'])
if (w.workflow.user==request.user): if request.user == w.workflow.user:
import pprint import pprint
input_dict = {} input_dict = {}
output_dict = {} output_dict = {}
......
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