From 4b598ca6f91236c94da250282ac8c89c7d947ee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Wed, 25 Jul 2018 20:29:08 +0200 Subject: Some fixes - DB cursor expects an enumerable - None should be returned when repartition is not available --- main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'main.py') diff --git a/main.py b/main.py index 1c65e56..ab523be 100644 --- a/main.py +++ b/main.py @@ -73,7 +73,7 @@ def fetch_markets(user): if user is None: cursor.execute("SELECT id,config,user_id FROM market_configs WHERE status='enabled'") else: - cursor.execute("SELECT id,config,user_id FROM market_configs WHERE status='enabled' AND user_id = %s", user) + cursor.execute("SELECT id,config,user_id FROM market_configs WHERE status='enabled' AND user_id = %s", [user]) for row in cursor: yield row -- cgit v1.2.3