Fix where clause in igloo like increment

Allowed players to obtain infinite likes per day
This commit is contained in:
Ben 2020-07-01 00:10:14 +01:00
parent 1193953316
commit 904963e3fc

View File

@ -542,7 +542,7 @@ async def handle_like_igloo(p):
like_insert = like_insert.on_conflict_do_update(
constraint='igloo_like_pkey',
set_=dict(count=IglooLike.count + 1, date=datetime.now()),
where=(IglooLike.date < datetime.today())
where=IglooLike.date < datetime.combine(datetime.today(), datetime.min.time())
)
like_count = await like_insert.gino.scalar()