from django_filters import rest_framework as filter


class CustomerRemarkFilter(filter.FilterSet):
    customer_id = filter.CharFilter(method="get_customer")

    def get_customer(self, queryset, name, value):
        if value:
            queryset = queryset.filter(crm_customer_id=value)
        return queryset
