Describe the bug
Spectacular errors when on the second example from these django-filter docs
The method argument is allowed to be a function and drf-spectacular assumes it is a string, raising this error
def resolve_filter_field(self, auto_schema, model, filterset_class, field_name, filter_field):
from django_filters.rest_framework import filters
if isinstance(filter_field, filters.OrderingFilter):
# only here filter_field.field_name is not the model field name/path
schema = build_basic_type(OpenApiTypes.STR)
elif filter_field.method:
> filter_method = getattr(filterset_class, filter_field.method)
E TypeError: getattr(): attribute name must be string
To Reproduce
Follow example in docs above
Expected behavior
I expect it to not error here, and be able to handle this valid filter
Describe the bug
Spectacular errors when on the second example from these
django-filterdocsThe
methodargument is allowed to be a function anddrf-spectacularassumes it is a string, raising this errorTo Reproduce
Follow example in docs above
Expected behavior
I expect it to not error here, and be able to handle this valid filter