api: don't use 400 error code for "sold out" error (#12397)
This commit is contained in:
parent
792efb6852
commit
e27c31583c
|
@ -69,7 +69,7 @@ class Fillslot(GenericAPIView):
|
|||
|
||||
if event.waiting_list_places:
|
||||
if event.waiting_list >= event.waiting_list_places:
|
||||
return Response({'err': 1, 'reason': 'sold out'}, status.HTTP_400_BAD_REQUEST)
|
||||
return Response({'err': 1, 'reason': 'sold out'})
|
||||
|
||||
if event.booked_places >= event.places or event.waiting_list:
|
||||
# if this is full or there are people waiting, put new bookings
|
||||
|
@ -77,7 +77,7 @@ class Fillslot(GenericAPIView):
|
|||
new_booking.in_waiting_list = True
|
||||
else:
|
||||
if event.booked_places >= event.places:
|
||||
return Response({'err': 1, 'reason': 'sold out'}, status.HTTP_400_BAD_REQUEST)
|
||||
return Response({'err': 1, 'reason': 'sold out'})
|
||||
|
||||
new_booking.save()
|
||||
response = {
|
||||
|
|
Loading…
Reference in New Issue