From f672a1bbb1341a3c9c1be338ffd3d344f0d51267 Mon Sep 17 00:00:00 2001 From: Mawoka Date: Wed, 28 Dec 2022 13:23:10 +0100 Subject: [PATCH] :ambulance: Fixed import-function --- classquiz/kahoot_importer/import_quiz.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/classquiz/kahoot_importer/import_quiz.py b/classquiz/kahoot_importer/import_quiz.py index a8a55e8..d31351c 100644 --- a/classquiz/kahoot_importer/import_quiz.py +++ b/classquiz/kahoot_importer/import_quiz.py @@ -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)