mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 23:55:46 +02:00
Fix bug, add autocomplete, make cache autocompletion slightly cleaner
This commit is contained in:
parent
e2959c27ad
commit
b26421b875
8 changed files with 43 additions and 31 deletions
|
|
@ -13,7 +13,7 @@ __all__ = ["add_deadline", "get_deadlines"]
|
|||
|
||||
async def add_deadline(session: AsyncSession, course_id: int, name: str, date_str: str):
|
||||
"""Add a new deadline"""
|
||||
date_dt = parse(date_str).replace(tzinfo=ZoneInfo("Europe/Brussels"))
|
||||
date_dt = parse(date_str, dayfirst=True).replace(tzinfo=ZoneInfo("Europe/Brussels"))
|
||||
|
||||
# If we only have a day, assume it's the end of the day
|
||||
if date_dt.hour == date_dt.minute == date_dt.second == 0:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue