diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-25 20:29:08 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2018-07-25 20:29:08 +0200 |
commit | 4b598ca6f91236c94da250282ac8c89c7d947ee2 (patch) | |
tree | 15d903ed7edb9154d1a58a7b7f01cddc15429e42 /main.py | |
parent | 3d6f74ee1a8b061e4b274dad70125ab6388f4d83 (diff) | |
download | Trader-4b598ca6f91236c94da250282ac8c89c7d947ee2.tar.gz Trader-4b598ca6f91236c94da250282ac8c89c7d947ee2.tar.zst Trader-4b598ca6f91236c94da250282ac8c89c7d947ee2.zip |
Some fixes
- DB cursor expects an enumerable
- None should be returned when repartition is not available
Diffstat (limited to 'main.py')
-rw-r--r-- | main.py | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -73,7 +73,7 @@ def fetch_markets(user): | |||
73 | if user is None: | 73 | if user is None: |
74 | cursor.execute("SELECT id,config,user_id FROM market_configs WHERE status='enabled'") | 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 status='enabled' AND 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 |