-
Notifications
You must be signed in to change notification settings - Fork 301
Delete Relationships #169
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
Comments
Hey there - thanks for reporting this :) At first I was skeptical at your explanation as you seemed to have mixed up few concepts as dealing with relationships at the resource level is different from dealing with relationships from a relationship link. This link is about relationship links (here implemented by However, since you seem to have figured a way to handle your specific issue, I would suggest you fork the project and submit a PR for reviewal. Adding some failing tests prior to this fix would also help. Thanks :) |
Forget about what I said, the specs indeed say:
|
The issue is being closed because the changes are merged |
Hey thanks for the nice work. But I've got an issue when I try to delete an relationship over the "relationships" JSON attribute. For example the following request won't delete a relationship:
However when I move the relationship to the attributes field, it is being deleted successfully:
I've debugged the code and made some tests. The file rest_framework_json_api/parsers.py:41 does not handle this specific case when the
data
attribute isNone
. But as stated in the JSON API specification, the relation should be deleted when this case is given, as here explained.Changing the mentioned code to the following example seems to fix this issue:
Is this method of deleting relationships going to be supported by this framework or should an alternative method being used to delete relationships?
The text was updated successfully, but these errors were encountered: