diff --git a/django/library/views.py b/django/library/views.py index 03cab19..0f05e0d 100644 --- a/django/library/views.py +++ b/django/library/views.py @@ -316,7 +316,7 @@ def new_question(request): if request.method == 'POST': question_text = request.POST.get('question', '') - question_image = request.FILES['question_image'] + question_image = request.FILES.get('question_image', None) # Handle different question types if question_type == 'true_false':