kopia lustrzana https://github.com/mkdryden/telegram-stats-bot
stats: Fix broken date selection for word statistics
rodzic
6aaa7ec9c9
commit
bb1e61e247
|
@ -14,6 +14,10 @@ Changed
|
|||
- Upgraded python-telegram-bot to version 20
|
||||
- Reply to edited messages
|
||||
|
||||
Fixed
|
||||
-----
|
||||
- Date selection for word statistics was broken
|
||||
|
||||
----------
|
||||
`0.7.0`_ - 2023-01-14
|
||||
----------
|
||||
|
|
|
@ -1044,9 +1044,9 @@ class StatsRunner(object):
|
|||
if user:
|
||||
q = q.where(messages.c['from_user'] == user[0])
|
||||
if start:
|
||||
q = q.where(messages.c['date'] >= str(pd.to_datetime('2019')))
|
||||
q = q.where(messages.c['date'] >= str(pd.to_datetime(start)))
|
||||
if end:
|
||||
q = q.where(messages.c['date'] < str(pd.to_datetime('2019')))
|
||||
q = q.where(messages.c['date'] < str(pd.to_datetime(end)))
|
||||
|
||||
q = q.scalar_subquery()
|
||||
f = TsStat(q)
|
||||
|
|
Ładowanie…
Reference in New Issue