-
Notifications
You must be signed in to change notification settings - Fork 301
SerializerMethodResourceRelatedField fails with queryset and many kwargs #779
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
The This field class does have other issues though like #639 so if you want to work on a PR which addresses these issues you are most welcome. Just keep in mind backwards compatibility respectively a deprecation path when refactoring. |
Thanks for immediate response.
OK, that makes sense now. Because of issues raised in #639 as well as no
I can't sign up for that now, but I feel the pain of #639, so in coming weeks I'll seriously consider doing that. |
Related to SerializerMethodResourceRelatedField and the issue django-json-api/django-rest-framework-json-api#779
Three cases below are OK, but the fourth one is surprisingly crashing
read_only
is generally ok and non-read_only
without many is also okBut non-
read_only
withmany
crashesMessage:
It looks like
queryset
is not passed correctly along the initialization.My interpretation is that is probably due to a bit hacky implementation of SerializerMethodResourceRelatedField which tries to by
SerializerMethodResourceRelatedField
andManySerializerMethodResourceRelatedField
at the same time which looks to me prone to bugs like this.So I would like to report this issue with
SerializerMethodResourceRelatedField
in the first place.Additionally, if my perception of reasons of problems with
SerializerMethodResourceRelatedField
is more widely accepted I could refactor it and fix the bug at the same time.The text was updated successfully, but these errors were encountered: