From 73ca8edcf58b86c2375e0918c44d1a91a0e49a37 Mon Sep 17 00:00:00 2001 From: Timo Zimmermann Date: Tue, 22 Sep 2020 15:42:38 +0200 Subject: [PATCH] empty dictionary as configuration value for SQS The [documentation](https://django-q.readthedocs.io/en/latest/configure.html#sqs-configuration) lists all keys as optional, but the way `get_broker` is implemented it will evaluate to false and return Redis. One way around this would be checking if the type of `Conf.SQS` is `dict`. --- django_q/brokers/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/django_q/brokers/__init__.py b/django_q/brokers/__init__.py index 5bef988..73eb9b6 100644 --- a/django_q/brokers/__init__.py +++ b/django_q/brokers/__init__.py @@ -176,7 +176,7 @@ def get_broker(list_key: str = Conf.PREFIX) -> Broker: return ironmq.IronMQBroker(list_key=list_key) # SQS - elif Conf.SQS: + elif type(Conf.SQS) == dict: from django_q.brokers import aws_sqs return aws_sqs.Sqs(list_key=list_key)