You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It took a lot longer than I thought. Using the class according to the documentation solved only a part of the problems.
my code
class NumberInFilter(filters.BaseInFilter, filters.NumberFilter):
pass
class ClientFilter(filters.FilterSet):
id__in = NumberInFilter(field_name='id', lookup_expr='in')
class Meta:
model = user_models.Client
fields = [
'id__in',
]
class ClientViewSet(viewsets.ModelViewSet):
queryset = user_models.Client.objects.all()
serializer_class = staff_serializers.ClientSerializer
filter_class = filters_serializers.ClientFilter
my url http://127.0.0.1:8000/v1/user/client/?id__in=,,
I propose to change the logic of the BaseCSVField.clean method, which should also check the constants.EMPTY_VALUES value and not include them in the filter sheet.
My class filter
When I make a request with a get parameter
v1/company/?brand_ids=
, I get the value['']
in the list.This behavior has been fixed for the widget #684 , I think it is necessary to edit the logic in BaseCSVFilter.
The text was updated successfully, but these errors were encountered: