Skip to content

Commit

Permalink
fix http error parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
digitalfox committed Oct 13, 2024
1 parent 4234411 commit ecb8a14
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions expense/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ def update_expense_state(request, expense_id, target_state):
try:
expense = Expense.objects.get(id=expense_id)
except Expense.DoesNotExist:
return HttpResponse(_("Expense %s does not exist" % expense_id), error_code=404)
return HttpResponse(_("Expense %s does not exist" % expense_id), status=404)

next_states = expense_next_states(expense, request.user)
if target_state in next_states:
Expand Down Expand Up @@ -289,7 +289,7 @@ def update_expense_vat(request, expense_id):
try:
expense = Expense.objects.get(id=expense_id)
except Expense.DoesNotExist:
return HttpResponse(_("Expense does not exist"), error_code=404)
return HttpResponse(_("Expense does not exist"), status=404)

if request.method == "GET":
form = ExpenseVATForm(instance=expense)
Expand Down

0 comments on commit ecb8a14

Please sign in to comment.