mirror of
https://github.com/solero/houdini.git
synced 2024-11-21 21:17:21 +00:00
Fix where clause in igloo like increment
Allowed players to obtain infinite likes per day
This commit is contained in:
parent
1193953316
commit
904963e3fc
@ -542,7 +542,7 @@ async def handle_like_igloo(p):
|
|||||||
like_insert = like_insert.on_conflict_do_update(
|
like_insert = like_insert.on_conflict_do_update(
|
||||||
constraint='igloo_like_pkey',
|
constraint='igloo_like_pkey',
|
||||||
set_=dict(count=IglooLike.count + 1, date=datetime.now()),
|
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()
|
like_count = await like_insert.gino.scalar()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user