From 8a7f783032d657e5b85ef73f7978761538babcf2 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Wed, 28 Oct 2020 23:18:55 +0100 Subject: [PATCH] Support for list args type in requests --- platypush/message/request/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/platypush/message/request/__init__.py b/platypush/message/request/__init__.py index 6cc6c01c0b..0980ff0677 100644 --- a/platypush/message/request/__init__.py +++ b/platypush/message/request/__init__.py @@ -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))