Defer faster, no longer error for courses than we don't know of

pull/134/head
stijndcl 2022-09-22 16:38:23 +02:00
parent dc1f0f6b55
commit 7f21a1cf69
2 changed files with 6 additions and 7 deletions

View File

@ -47,12 +47,12 @@ class School(commands.Cog):
Schedules are personalized based on your roles in the server. If your schedule doesn't look right, make sure
that you've got the correct roles selected. In case you do, ping D STIJN.
"""
if day_dt is None:
day_dt = date.today()
day_dt = skip_weekends(day_dt)
async with ctx.typing():
if day_dt is None:
day_dt = date.today()
day_dt = skip_weekends(day_dt)
try:
member_instance = to_main_guild_member(self.client, ctx.author)

View File

@ -190,8 +190,7 @@ async def parse_schedule_from_content(content: str, *, database_session: AsyncSe
if code not in course_codes:
course = await get_course_by_code(database_session, code)
if course is None:
# raise ValueError(f"Unable to find course with code {code} (event {event.name})") # noqa: E800
continue # TODO uncomment the line above after all courses have been added
continue
course_codes[code] = course