-
Notifications
You must be signed in to change notification settings - Fork 300
Test support of DRF HyperlinkedIdentityField #497
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
Test support of DRF HyperlinkedIdentityField #497
Conversation
@sliverc I added a test for blog HyperlinkedIdentityField relationship with Entry. It seems the error arises when we we use a non model field to serialize the relationship. If we use a model field name directly then no related links are produced for the blogs and we just a simple blog data without related links. I can try and look deeper into the issue, not sure if I'll be able to solve it. Will you be able to at least tell me where I might start looking to try and debug this case? |
It seems that HyperlinkedIdentityField doesn't support source attribute to be overwritten. That's why an exception is raised. This should not concern us though as it is not correctly used. So best adjust your test case that we focus on simply using |
aa7e0a6
to
183c9b6
Compare
@sliverc I rewrote the tests using default drf serializers to see if the entry works with hyperlinkedrelated field. No issue so far. |
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.
A few small changes and this will be ready for merging.
@sliverc Made requested changes |
@Alig1493 Thanks. |
Fixes #298
Description of the Change
Checklist
CHANGELOG.md
AUTHORS