diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-10 16:33:25 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-05-10 16:33:25 +0200 |
commit | e45c64a5ace2637a9ff290a42cde89e2403ae53d (patch) | |
tree | 0810fcbac31803d66c5f553dd174b4a3fc00bec9 /main.py | |
parent | 5321200c05b3b693581ec4238c74eb02e0b715d7 (diff) | |
download | Trader-e45c64a5ace2637a9ff290a42cde89e2403ae53d.tar.gz Trader-e45c64a5ace2637a9ff290a42cde89e2403ae53d.tar.zst Trader-e45c64a5ace2637a9ff290a42cde89e2403ae53d.zip |
Fetch only enabled market
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 |