Support for list args type in requests

This commit is contained in:
Fabio Manganiello 2020-10-28 23:18:55 +01:00
parent 77530b4a06
commit 8a7f783032

View file

@ -225,7 +225,12 @@ class Request(Message):
# Run the action
args = self._expand_context(**context)
args = self.expand_value_from_context(args, **context)
response = plugin.run(method=method_name, **args)
if isinstance(args, dict):
response = plugin.run(method_name, **args)
elif isinstance(args, list):
response = plugin.run(method_name, *args)
else:
response = plugin.run(method_name, args)
if not response:
logger.warning('Received null response from action {}'.format(action))