Skip to content

Commit

Permalink
rate needs to be a decimal, was being passed as a string.
Browse files Browse the repository at this point in the history
  • Loading branch information
jessykate authored and jonathan-s committed Mar 11, 2019
1 parent b78dfa3 commit 1385c98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/views/unsorted.py
Original file line number Diff line number Diff line change
Expand Up @@ -1632,7 +1632,7 @@ def BookingManageEdit(request, location_slug, booking_id):
messages.add_message(request, messages.INFO, "Invalid room given!")
elif 'rate' in request.POST:
rate = request.POST.get("rate")
if rate >= 0 and rate != booking.get_rate():
if Decimal(rate) >= Decimal(0.0) and rate != booking.get_rate():
booking.set_rate(rate)
messages.add_message(request, messages.INFO, "Rate changed.")
else:
Expand Down

0 comments on commit 1385c98

Please sign in to comment.