Skip to content

Commit

Permalink
refactor: Remove unused variables
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasdutraf committed Apr 3, 2021
1 parent e62d6fe commit d222d76
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions project/api/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def add_categories():
}

return jsonify(response), 201
except Exception as err:
except exc.IntegrityError:
response = {
"status": "fail",
"data": {
Expand Down Expand Up @@ -159,7 +159,7 @@ def edit_request(requestid):
}

return jsonify(response), 201
except Exception as err:
except exc.IntegrityError:
response = {
"status": "fail",
"data": {
Expand All @@ -177,7 +177,7 @@ def delete_request(requestid):
error_response = {"status": "fail", "message": "Could not delete request."}

if not request:
return jsonify(error_response), 400
return jsonify(error_response), 404
try:
db.session.delete(request)
db.session.commit()
Expand Down

0 comments on commit d222d76

Please sign in to comment.