Skip to content

Commit

Permalink
Renamed variable
Browse files Browse the repository at this point in the history
  • Loading branch information
FSadrieh committed Nov 11, 2024
1 parent 1fa2870 commit ad59616
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions evap/staff/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1103,11 +1103,11 @@ def create_exam_evaluation(request: HttpRequest) -> HttpResponse:
if evaluation.has_exam_evaluation:
raise SuspiciousOperation("An exam evaluation already exists for this course")

exam_date = request.POST.get("exam_date")
if not exam_date:
return HttpResponseBadRequest("Exam date missing.")
exam_date_string = request.POST.get("exam_date")
if not exam_date_string:
return HttpResponseBadRequest("Exam date missing.")
try:
exam_date = datetime.strptime(exam_date, "%Y-%m-%d").date()
exam_date = datetime.strptime(exam_date_string, "%Y-%m-%d").date()
except ValueError:
return HttpResponseBadRequest("Exam date invalid.")

Expand Down

0 comments on commit ad59616

Please sign in to comment.