[Answered ]-Django AttributeError when saving data with DRF

1👍

review_score at ReviewSerializer should be a serializers.ReadOnlyField(). Change that and it should work.

0👍

You should remove row

obj.save()

in the perform_create function. Model saving is already happening in the line

obj = serializer.save(created_by=self.request.user)

Leave a comment