nested saving, way to wrap serializer save in a transaction?

146 views
Skip to first unread message

Michael Clagett

unread,
Apr 21, 2014, 3:33:52 PM4/21/14
to django-res...@googlegroups.com
Hello,

I have been writing some serializers with nested fields to do creation and updating on related models using one serializer save.  I am wondering if I can wrap the serializer create/update in a transaction so lingering database rows aren't at risk if part of the save fails.

Info Cascade

unread,
Apr 21, 2014, 6:05:22 PM4/21/14
to django-res...@googlegroups.com
Hi --

I need to do this too!  This is somewhat related to my previous post, which I'm still hoping for an answer for.
I'd love to see an example of how to do this.

Liam


On 04/21/2014 12:33 PM, Michael Clagett wrote:
Hello,

I have been writing some serializers with nested fields to do creation and updating on related models using one serializer save.  I am wondering if I can wrap the serializer create/update in a transaction so lingering database rows aren't at risk if part of the save fails.
--
You received this message because you are subscribed to the Google Groups "Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-fram...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages