Open creyD opened 2 years ago
Our current workaround is to exclude these fields manually, but this isn't really a solution.
I see this is a problem known, as it is mentioned in the TODO.txt
Yeah this is is probably true - I would absolutely accept a PR with a test or two that fixes this issue - but I haven't used this project for a long time, so I don't have the time to do anything about it myself unfortunately.
When using the
AutoPrefetchViewSetMixin
errors get thrown for fields which are not on the originalserializer_class
(?). We have aGenericViewSet
which has a main model and actions which return different serializers (basically nested info). When using the Mixin, the following error appears:Where the
select_related
fields are the actual fields of the serializer being used and theChoices
are the fields on the main model/ serializer_class for this ViewSet.