Fixed handle 'none' value for argument 'nodes' in /graph/execute/

Change-Id: I304f79da0393891b547b5314cb549234a49c935c
Closes-Bug: 1625110
This commit is contained in:
Bulat Gaifullin 2016-09-19 13:21:55 +03:00
parent 62fb7c25df
commit c173e7c693
1 changed files with 3 additions and 2 deletions

View File

@ -45,9 +45,10 @@ class GraphExecuteParamsValidator(BasicValidator):
nodes_to_check = set()
for graph in parsed['graphs']:
nodes_to_check.update(graph.get('nodes', []))
nodes_to_check.update(graph.get('nodes') or [])
cls.validate_nodes(nodes_to_check, parsed['cluster'])
if nodes_to_check:
cls.validate_nodes(nodes_to_check, parsed['cluster'])
return parsed
@classmethod