Skip to content

Commit 0298751

Browse files
committed
Return empty dict instead of None in filters endpoint
1 parent 972f900 commit 0298751

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

app/routers/course.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -234,6 +234,6 @@ def get_filter_values(session: SessionDep, filter: CourseFilter) -> dict[str, st
234234
)
235235
return {sem: sem.capitalize() for sem in result_scalars}
236236
else:
237-
return None
237+
return {}
238238
result_mappings = session.execute(select(code_col, title_col)).mappings().all()
239239
return {row[code_col]: row[title_col] for row in result_mappings}

0 commit comments

Comments
 (0)