From 7719d386e6fa99e43f6ed6951199de8a2e870c92 Mon Sep 17 00:00:00 2001 From: Ryan Cartwright Date: Thu, 4 May 2023 20:12:38 +1000 Subject: [PATCH] feat: handle if queue task is just payload --- nitric/api/queues.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/nitric/api/queues.py b/nitric/api/queues.py index 9ac808c..a002c8b 100644 --- a/nitric/api/queues.py +++ b/nitric/api/queues.py @@ -155,7 +155,9 @@ async def send( task = Task() if isinstance(task, dict): - # TODO: handle tasks that are just a payload + # Handle if its just a payload + if task.get("payload") is None: + task = {"payload": task} task = Task(**task) try: