Fix for if statements
This commit is contained in:
parent
570ef6f109
commit
d419419487
1 changed files with 6 additions and 6 deletions
|
@ -95,10 +95,10 @@ class Procedure(object):
|
||||||
conf['else_branch'] = request_config[key]
|
conf['else_branch'] = request_config[key]
|
||||||
if_config.put(conf)
|
if_config.put(conf)
|
||||||
|
|
||||||
if not if_config.empty():
|
if not if_config.empty():
|
||||||
reqs.append(IfProcedure.build(**(if_config.get())))
|
reqs.append(IfProcedure.build(**(if_config.get())))
|
||||||
if key == 'else':
|
if key == 'else':
|
||||||
continue
|
continue
|
||||||
|
|
||||||
request_config['origin'] = Config.get('device_id')
|
request_config['origin'] = Config.get('device_id')
|
||||||
request_config['id'] = id
|
request_config['id'] = id
|
||||||
|
@ -108,8 +108,8 @@ class Procedure(object):
|
||||||
request = Request.build(request_config)
|
request = Request.build(request_config)
|
||||||
reqs.append(request)
|
reqs.append(request)
|
||||||
|
|
||||||
if not if_config.empty():
|
for pending_if in if_config.queue:
|
||||||
reqs.append(IfProcedure.build(**(if_config.get())))
|
reqs.append(IfProcedure.build(**pending_if))
|
||||||
|
|
||||||
return procedure_class(name=name, _async=_async, requests=reqs, args=args, backend=backend, **kwargs)
|
return procedure_class(name=name, _async=_async, requests=reqs, args=args, backend=backend, **kwargs)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue