From f0a05c8b4d78c78ac1182f433afa048f43cd3ed2 Mon Sep 17 00:00:00 2001 From: stijndcl Date: Thu, 14 Jul 2022 22:03:56 +0200 Subject: [PATCH] Wrap result in a list --- database/crud/ufora_courses.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/database/crud/ufora_courses.py b/database/crud/ufora_courses.py index 152d687..08dd04f 100644 --- a/database/crud/ufora_courses.py +++ b/database/crud/ufora_courses.py @@ -9,7 +9,7 @@ from database.models import UforaCourse, UforaCourseAlias async def get_all_courses(session: AsyncSession) -> list[UforaCourse]: """Get a list of all courses in the database""" statement = select(UforaCourse) - return (await session.execute(statement)).scalars().all() + return list((await session.execute(statement)).scalars().all()) async def get_course_by_name(session: AsyncSession, query: str) -> Optional[UforaCourse]: