You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello @aasutossh! I believe this case wasn't covered in this library yet. As a workaround, I can suggest you implement two serializers: the first for creating/updating and the second for reading.
My models:
serializers.py
views.py
POSTing data like these to ListSerializer:
results in error
But the
List
is created without thelistitem_set
.If I comment out
depth=2
in theListItemsSerializer
it works fine.I've enabled the depth option because I get all the related data at once, instead of fetching each and every data manually.
Let me know if something is unclear, or if I've made a mistake.
The text was updated successfully, but these errors were encountered: