diff --git a/compensation/filters.py b/compensation/filters.py index eb8a5b7d..d028e3ce 100644 --- a/compensation/filters.py +++ b/compensation/filters.py @@ -10,6 +10,7 @@ from django.utils.translation import gettext_lazy as _ from django import forms from django.db.models import QuerySet, Q +from konova.filters.mixins import ConservationOfficeTableFilterMixin from konova.filters.table_filters import QueryTableFilter, CheckboxTableFilter, SelectionTableFilter, AbstractTableFilter @@ -163,6 +164,15 @@ class CheckboxEcoAccountTableFilter(CheckboxTableFilter): return queryset +class SelectionEcoAccountTableFilter(ConservationOfficeTableFilterMixin): + """ Special selection table filter for eco accounts + + EcoAccounts only need a selection filter for conservation office + + """ + pass + + class EcoAccountTableFilter(AbstractTableFilter): """ TableFilter for eco accounts @@ -174,7 +184,7 @@ class EcoAccountTableFilter(AbstractTableFilter): request_data = kwargs.get("data", None) # Pipe the queryset through all needed filters - self.selection_filter = SelectionTableFilter( + self.selection_filter = SelectionEcoAccountTableFilter( data=request_data, queryset=qs, )