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)
- [Answered ]-Assign table alias name in a QuerySet
- [Answered ]-Why does cloning the django inline formsets result to forms with similar ids and names?
- [Answered ]-Django testing view with pytest
- [Answered ]-Django testing wastes too much time on test database creating
Source:stackexchange.com