🚑 Fixed import-function

This commit is contained in:
Mawoka
2022-12-28 13:23:10 +01:00
parent e31df1274b
commit f672a1bbb1
+2 -1
View File
@@ -60,7 +60,8 @@ async def import_quiz(quiz_id: str, user: User) -> Quiz | str:
).dict()
)
cover = None
if quiz.kahoot.cover != "":
print(quiz.kahoot.cover)
if quiz.kahoot.cover != "" and quiz.kahoot.cover is not None:
image_bytes = await _download_image(quiz.kahoot.cover)
image_name = f"{quiz_id}--{uuid.uuid4()}"
await storage.upload(file_name=image_name, file_data=image_bytes)