-
Notifications
You must be signed in to change notification settings - Fork 301
Clear m2m relationships instead of deleting related objects during PATCH #788
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
Clear m2m relationships instead of deleting related objects during PATCH #788
Conversation
6deae03
to
25a36fa
Compare
Codecov Report
@@ Coverage Diff @@
## master #788 +/- ##
=======================================
Coverage 97.39% 97.39%
=======================================
Files 56 56
Lines 2989 2999 +10
=======================================
+ Hits 2911 2921 +10
Misses 78 78
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for working on this. I think the patch method needs some refactoring. See my comment above and feel free to discuss it as you think it is best.
26ca39a
to
6021bd3
Compare
…hem during PATCH Calling PATCH on an M2M RelationshipView when there were already some relationships was breaking. This was because the related objects were being deleted instead of just clearing the relationship and starting afresh.
b5ecca9
to
3b6c12d
Compare
Thanks for your work! I have only added another test to make sure that #244 now works as well. |
Description of the Change
Calling PATCH on an M2M RelationshipView when there were already some relationships was breaking. This was because the related objects were being deleted instead of just clearing the relationship and starting afresh.
Fixes #784
Fixes #244
Manual testing proof:

Checklist
CHANGELOG.md
updated (only for user relevant changes)AUTHORS