Commit 68d85140 authored by Janez K's avatar Janez K

fixed merge dictionaries widget

parent 4bed6381
......@@ -1202,14 +1202,32 @@
"model": "workflows.abstractinput",
"fields": {
"widget": 380,
"name": "Dictionaries",
"name": "Dictionary 1",
"short_name": "dct",
"uid": "7d53195e-49f3-4873-989d-e096563f84ed",
"default": "",
"required": false,
"multi": true,
"multi": false,
"parameter_type": null,
"variable": "dict1",
"parameter": false,
"order": 1,
"description": ""
}
},
{
"pk": 908,
"model": "workflows.abstractinput",
"fields": {
"widget": 380,
"name": "Dictionary 2",
"short_name": "dct",
"uid": "53efae34-3906-4732-818c-78f44e6bceea",
"default": "",
"required": false,
"multi": false,
"parameter_type": null,
"variable": "dicts",
"variable": "dict2",
"parameter": false,
"order": 1,
"description": ""
......
......@@ -10,10 +10,9 @@ def base_concatenate_lists(input_dict):
return output_dict
def base_merge_dictionaries(input_dict):
dicts = input_dict['dicts']
items = []
for d in dicts:
items = items+d.items()
dict1 = input_dict['dict1']
dict2 = input_dict['dict2']
items = dict1.items()+dict2.items()
output_dict = {}
output_dict['dict']=dict(items)
return 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