-
Notifications
You must be signed in to change notification settings - Fork 301
Use REST framework serializer functionality to extract includes #632
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
Use REST framework serializer functionality to extract includes #632
Conversation
0f74edf
to
eaa25a1
Compare
I like where this PR is going. This change might not be 100% backwards compatible especially the serializer_method part. However a change like suggested in #639 could solve this. |
😄 just looked at the Hint: currently failing tests should be fixed with #634 |
eaa25a1
to
430cd3e
Compare
Codecov Report
@@ Coverage Diff @@
## master #632 +/- ##
==========================================
- Coverage 96.16% 95.34% -0.83%
==========================================
Files 56 56
Lines 2866 2855 -11
==========================================
- Hits 2756 2722 -34
- Misses 110 133 +23
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #632 +/- ##
==========================================
- Coverage 96.16% 96.13% -0.04%
==========================================
Files 56 56
Lines 2870 2869 -1
==========================================
- Hits 2760 2758 -2
- Misses 110 111 +1
Continue to review full report at Codecov.
|
@sliverc Done |
ffb2b46
to
a4ecd9a
Compare
756370e
to
aab3455
Compare
@sliverc Are there any more updates required ? |
aab3455
to
1bd03c5
Compare
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.
Test looks good. See inline comment for a small change.
de9aafa
to
49c33b0
Compare
49c33b0
to
588e7fc
Compare
588e7fc
to
82a68b6
Compare
Merged. Thanks for your work. |
Cool, thanks. Any expected release date ? |
Fixes #
Let's say we have code like below:
Url
GET api/parent/1/
works fine until I want to "include" child in the response (GET api/parent/1/?include=child
). It does not add the included section, because renderer fails to calculatechild
property inextract_relation_instance
method.Child is not just Foreign key, it is a property of
intermidiate_object
that we have on the parent. I'm pretty sure we have to calculate it exactly same way we do when serializing parent serializer.Checklist
CHANGELOG.md
updated (only for user relevant changes)AUTHORS