-
Notifications
You must be signed in to change notification settings - Fork 301
Validation of included_resources fails when nested #949
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
As a follow up I question whether it is a good idea to validate include query parameters in init of a serializer as init can be called anytime. Better to be moved to |
@sliverc Is this at all related to this problem I am facing. I just upgraded a django 1.11 app up to latest and upgrded all django related dependencies to latest at the same time. I am hitting an endpoint that maps to the AccountLicenseViewSet (I included the classes below). It gets and serializes the initial queryset fine. However, when it gets into the restframeworkjsonapi renderer. While initializing the related serializer, This is all working on perfectly on the 1.11 django project that is still running on another computer I have. But it is now failing here. Is this possibly related to the issue you mentioned? AccountLicenseViewSet
AccountLicenseSerializer
|
@jking6884 Most likely this is the same issue you are facing then this one. Best try version DJA 4.1.0 for now till this issue has been addressed. As a note for Django 3.2 support there were no changes needed so DJA 4.1.0 should also run with the newest Django version. |
Description of the Bug Report
#900 introduced validation of
included_resources
but causes a regression that when one ofincluded_serializers
of the current serializer of called view usesincluded_resources
it will fail.I assume validation of
included_resources
should actually be done in the serializer meta class and only query parameters validated inIncludedResourcesValidationMixin
.See discussion #318 where there is also some code to reproduce it.
Checklist
The text was updated successfully, but these errors were encountered: