From f6b6c13c1272925111c4a9b074e9296f670da802 Mon Sep 17 00:00:00 2001 From: Mike Edmister Date: Thu, 25 Apr 2019 11:49:04 -0400 Subject: [PATCH] removed cast needed because of wrong column type --- pyircbot/modules/StockPlay.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyircbot/modules/StockPlay.py b/pyircbot/modules/StockPlay.py index 370ea00..43f1ec0 100644 --- a/pyircbot/modules/StockPlay.py +++ b/pyircbot/modules/StockPlay.py @@ -156,7 +156,7 @@ class StockPlay(ModuleBase): self.log.warning("{} wants top 10 sent to {}".format(nick, replyto)) with closing(self.sql.getCursor()) as c: - for num, row in enumerate(c.execute("""SELECT h1.nick as nick, CAST(h1.cents as INTEGER) as cents + for num, row in enumerate(c.execute("""SELECT h1.nick as nick, h1.cents as cents FROM stockplay_balance_history h1 INNER JOIN (SELECT nick, max(day) as MaxDate FROM stockplay_balance_history WHERE nick != ? GROUP BY nick) h2