[Answered ]-How to update serialized data on valid?

2👍

You can pass b as argument of save method (docs). This will add booking_ref for new tickets:

serialized = TicketSerializer(data=request.data, many=True)
if serialized.is_valid():
    b = BookTicket.objects.create(user=request.user)
    serialized.save(booking_ref=b)

Leave a comment