Open mfoglio opened 2 years ago
I am also searching for a solution to this issue. While I have been able to find workarounds for some cases, these workarounds are not able to accommodate different types of lookups. Therefore, I am hoping that @vdboor will provide an answer soon clarifying how we can properly solve this problem
Hello, I have the following models representing some
Data
that can be created by anAnnotator
which can either be a humanUserAnnotator
or an AIAiModelAnnotator
I am using
django-rest-framework
anddjango-filter
to expose an API endpoint where I can look for data produced by a specific AI model. The serializers are the following:And the viewset is:
When I try to call the GET endpoint with the error
'Meta.fields' must not contain non-model field names: annotator__ai_model
which is caused by addingannotator__ai_model
to theAnnotationTrainingViewSet
. Without specifyingannotator__ai_model
the code works fine but of course I can't usedjango-filter
as I'd like to. Is this the expected behavior? Is django-filter supported?