Use linkage objects for relationships #425
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Updating relationships now uses linkage objects, as the latest JSON API requires and as discussed in #404.
I ended up with a bit of yak shaving along the way, and updated the input for the tests in
test_jsonapi.py
as well. I don't think I broke anything else.Regarding
test_updating.TestAssociationProxy.test_extra_info
, I'm not entirely sure what this is supposed to do. Shouldn't intermediate data basically be handled as being its own resource? I can't find any mention of intermediate data in the spec, unless I missed something, which is entirely possible.In addition, I ended up having to eliminate the dictionary passing that was done and pass a list instead. I couldn't figure out what the dictionary was supposed to do and it created some trouble. If they are meant to update the related objects somehow, can't that be done by instead filling a list and manipulating the objects directly?
Anyway, that was a good start. Happy to take a look at some of the other m2m/association proxy stuff, but I need to know what actually needs doing first 😄