Skip to content

Commit

Permalink
Remove 'ERROR WITH ALGORITHMS' from non-exception cases (#128)
Browse files Browse the repository at this point in the history
  • Loading branch information
sfaigan authored Jul 27, 2022
1 parent 5c70661 commit ecf2d11
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion schedule/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ def get(self, request: HttpRequest, year: int, semester: str, requested_company_
schedule_pickle.close()
schedule, error = c2alg1(professors, alg_2_output, False)
if error is not None and error != "":
return HttpResponse("ERROR WITH ALGORITHMS: " + error, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
return HttpResponse(error, status=status.HTTP_500_INTERNAL_SERVER_ERROR)
return HttpResponse(json.dumps(schedule), status=status.HTTP_200_OK)
except Exception as err:
print(traceback.format_exception(err))
Expand Down

0 comments on commit ecf2d11

Please sign in to comment.