fix timestamp on postgres (#26)
This commit is contained in:
parent
4f5fe8035d
commit
662587dbf2
1 changed files with 3 additions and 3 deletions
6
crud.py
6
crud.py
|
|
@ -89,12 +89,12 @@ async def delete_event_tickets(event_id: str) -> None:
|
|||
async def purge_unpaid_tickets(event_id: str) -> None:
|
||||
time_diff = datetime.now() - timedelta(hours=24)
|
||||
await db.execute(
|
||||
"""
|
||||
DELETE FROM events.ticket WHERE event = ? AND paid = false AND time < ?
|
||||
f"""
|
||||
DELETE FROM events.ticket WHERE event = ? AND paid = false AND time < {db.timestamp_placeholder}
|
||||
""",
|
||||
(
|
||||
event_id,
|
||||
time_diff,
|
||||
time_diff.timestamp(),
|
||||
),
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue