aboutsummaryrefslogtreecommitdiff
path: root/main.py
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2018-05-10 16:33:25 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2018-05-10 16:33:25 +0200
commite45c64a5ace2637a9ff290a42cde89e2403ae53d (patch)
tree0810fcbac31803d66c5f553dd174b4a3fc00bec9 /main.py
parent5321200c05b3b693581ec4238c74eb02e0b715d7 (diff)
downloadTrader-e45c64a5ace2637a9ff290a42cde89e2403ae53d.tar.gz
Trader-e45c64a5ace2637a9ff290a42cde89e2403ae53d.tar.zst
Trader-e45c64a5ace2637a9ff290a42cde89e2403ae53d.zip
Fetch only enabled market
Diffstat (limited to 'main.py')
-rw-r--r--main.py4
1 files changed, 2 insertions, 2 deletions
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):
71 cursor = dbs.psql.cursor() 71 cursor = dbs.psql.cursor()
72 72
73 if user is None: 73 if user is None:
74 cursor.execute("SELECT id,config,user_id FROM market_configs") 74 cursor.execute("SELECT id,config,user_id FROM market_configs WHERE status='enabled'")
75 else: 75 else:
76 cursor.execute("SELECT id,config,user_id FROM market_configs WHERE user_id = %s", user) 76 cursor.execute("SELECT id,config,user_id FROM market_configs WHERE status='enabled' AND user_id = %s", user)
77 77
78 for row in cursor: 78 for row in cursor:
79 yield row 79 yield row