RelationshipView doesn't provide a way to modify relations queryset for fetching and validation #936
SafaAlfulaij
started this conversation in
General
Replies: 1 comment 2 replies
-
But is not overwriting the |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
django-rest-framework-json-api/rest_framework_json_api/serializers.py
Line 64 in 5e2f60d
There is no way to change the queryset used for fetching the related input field but to subclass the class and replace all of
to_internal_value
.Vanilla DRF provides a
queryset
parameter for related fields to do the mentioned. Checkout:https://github.com/encode/django-rest-framework/blob/master/rest_framework/relations.py#L243-L260
Beta Was this translation helpful? Give feedback.
All reactions