Added time-input to new editor

This commit is contained in:
Mawoka
2022-06-17 18:24:14 +02:00
parent 88d8f4f5d7
commit 4b24c3b5be
2 changed files with 62 additions and 20 deletions
+7 -5
View File
@@ -96,11 +96,13 @@ async def finish_edit(edit_id: str, quiz_input: QuizInput):
def mark_image_for_deletion(new: str | None, index: int, old_quiz: Quiz | None):
if old_quiz is None:
return
print(new, old_quiz.questions[index]["image"])
if new == old_quiz.questions[index]["image"]:
return
else:
images_to_delete.append(old_quiz.questions[index]["image"])
try:
if new == old_quiz.questions[index]["image"]:
return
else:
images_to_delete.append(old_quiz.questions[index]["image"])
except IndexError:
pass
for i, question in enumerate(quiz_input.questions):
image = question.image