🚨 Merged if-statement

This commit is contained in:
Mawoka
2022-05-07 19:23:08 +02:00
parent 18b86542ad
commit 625c30e6a6
+1 -2
View File
@@ -31,8 +31,7 @@ async def generate_spreadsheet(quiz_results: dict, quiz: Quiz, with_images: bool
answer_data = quiz_results[str(i)]
worksheet.write(i + 1, 0, question["question"])
worksheet.write(i + 1, 1, question["time"])
if with_images:
if quiz[i]["image"] != "" or question["image"] is not None:
if with_images and quiz[i]["image"] != "" or question["image"] is not None:
async with ClientSession() as session, session.get(question["image"]) as response:
img_data = BytesIO(await response.read())
worksheet.insert_image(i + 1, 2, quiz[i]["image"], {"image_data": img_data})