From e45c64a5ace2637a9ff290a42cde89e2403ae53d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Isma=C3=ABl=20Bouya?= Date: Thu, 10 May 2018 16:33:25 +0200 Subject: Fetch only enabled market --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'main.py') diff --git a/main.py b/main.py index ee25182..1c65e56 100644 --- a/main.py +++ b/main.py @@ -71,9 +71,9 @@ def fetch_markets(user): cursor = dbs.psql.cursor() if user is None: - cursor.execute("SELECT id,config,user_id FROM market_configs") + 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 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