trivial: update variable name not to clash with global view name

This commit is contained in:
Frédéric Péters 2016-06-20 14:52:56 +02:00
parent 18d45ce6af
commit 6143122436
1 changed files with 3 additions and 3 deletions

View File

@ -69,9 +69,9 @@ class Fillslot(GenericAPIView):
event = Event.objects.filter(id=event_pk)[0]
if event.booked_places >= event.places:
return Response({'err': 1, 'reason': 'sold out'}, status.HTTP_400_BAD_REQUEST)
booking = Booking(event_id=event_pk, extra_data=request.data)
booking.save()
response = {'err': 0, 'booking_id': booking.id}
new_booking = Booking(event_id=event_pk, extra_data=request.data)
new_booking.save()
response = {'err': 0, 'booking_id': new_booking.id}
return Response(response)
fillslot = Fillslot.as_view()