Comments (4)
Appears to be caused by #28
from drf-writable-nested.
I believe this PR will fix it: #29
from drf-writable-nested.
Hello @zero-master!
The latest version 4.0.2 contains the fix of the problem with OneToOne updating without specifying id. I will appreciate if you check your code with the latest version of the package and leave feedback if everything is OK.
from drf-writable-nested.
Hi, I have nested reverse relation (fk) which I try to update (there is a unique constraint on pk and additional field on in nested model).
When I try to update it I've got IntegrityError: duplicate key value violates unique constraint.
Seems that it try to create nested object instead of updating it.
However , it works when I pass directly 'id' for the nested object that is supposed to be updated in request:
works: "test_phase": [{"id": 4 ,"phase": "24h" , "result": "passed"}]
doeasn't: "test_phase": [{"phase": "24h" , "result": "passed"}]
from drf-writable-nested.
Related Issues (20)
- "depth" property does not work? HOT 1
- You cannot call `.save()` after accessing `serializer.data`.If you need to access data before committing to the database then inspect 'serializer.validated_data' instead. HOT 2
- UniqueFieldMixin does not work for djangorestframwork of versions >= 3.11 HOT 1
- ValueError when trying to set a related id field to the wrong value HOT 1
- Parent instance is inaccesible in child validate data for reverse HOT 1
- Update nested related OneToOneField without providing its pk
- Delete reverse relations before update or create in NestedUpdateMixin HOT 4
- Migrate to new CI platform HOT 1
- Take into account the unique_together Models Meta field in UniqueFieldsMixin HOT 1
- The `.create()` method does not support writable nested fields by default
- Validation of child runs twice. Is this deliberate as it seems a bit inefficient to run the same code twice. HOT 5
- Error when trying to update reverse many-to-many relation
- Creating multiple objects with drf-writable-nested WritableNestedModelSerializer not creating the nested relation objects HOT 2
- how to use with self related field(manytomany)
- [Security] Changing related objects HOT 3
- Setting null when sending data as form data in one-to-one relationships
- The `.create()` method does not support writable nested fields by default. HOT 1
- Problem of pass through values to nested serializers from the call to the base serializer's save method. HOT 3
- Reverse Foreign Key is not working HOT 1
- Reverse FK relation got: TypeError: Car() got an unexpected keyword argument 'car_users'
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from drf-writable-nested.