Yago
unread,Jul 26, 2019, 2:05:53 PM7/26/19Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Django REST framework
Hi.
I'm using drf-writable-nested packet, which provides a CreateMixin and a
UpdateMixin on serializers, avoiding creating code for writble serializers.
Now, I need to get a sum from "price" field children components and
update the parents component field with this value.
I've tried to do that overriding the "create" method, by editing
"validated_data", but even changing that variable, it seems that there's
no effect, once the field still save on database with the original value
which comes from request.
Does anybody has an idea about that behavior?