-
-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error with nested validate #214
Comments
Can you show us the way you are using validate data method on your nested serializer so that we at least get a starting point, posting a piece of code which you think is causing that error would be very helpful to anyone who wants to help you. It’s better to mention the version of django-restql which you are using to make things easier. |
MODELS
SERIALIZERS
Tested with django-restql versions: 0.10.2 and 0.11.2 |
There is nothing wrong with your code, I think the problem is on the way you are sending your request, you are probably adding space(s) before or after the word NOTE: "create " != "create" != " create" != " create " |
The request body is right. This message appears only when I use the validate. When validate is removed, the request works normaly. |
I think there's something wrong in your code, I have tried to reproduce your scenario, to me it works just fine you don't even need the |
Yes, it works until the step you've tested. But if you try to re-send the request, with a new valid email, the DRF shows a fk constraint error on nested item. I think the fk id on nested item is lost when DRF raises a exception. |
I tried to use the validate on serializer, but I noticed that the DRF constraint validation always is throwed before the validate method on serializer. |
When I use validate data method on a nested serializer, I receive the following message:
"
create
is not a valid operation, valid operations for this request areadd
,create
,remove
,update
"The text was updated successfully, but these errors were encountered: