Here is my problem in great détails :
Is there a reason that the OrderSerializer has
exams as read_only?
class OrderSerializer(serializers.ModelSerializer): exams = ExamSerializer(many=0,read_only=1) class Meta: model = Order fields = '__all__'
That’s likely why the order doesn’t get
exams set when calling save leading to a NOT NULL constraint failure.
Thanks, the problem is solved