Skip to content
Snippets Groups Projects
Unverified Commit f8c05fb8 authored by Fredrik Jonsson's avatar Fredrik Jonsson Committed by GitHub
Browse files

Merge pull request #2402 from HyphaApp/fix/gh-2388-update-filter

fix: Project table filter's broken dropdown
parents ee644a1d ae7839e4
No related branches found
No related tags found
No related merge requests found
...@@ -43,9 +43,9 @@ class ProjectListFilter(filters.FilterSet): ...@@ -43,9 +43,9 @@ class ProjectListFilter(filters.FilterSet):
(1, 'Behind schedule'), (1, 'Behind schedule'),
) )
fund = Select2ModelMultipleChoiceFilter(label='Funds', queryset=get_used_funds) project_fund = Select2ModelMultipleChoiceFilter(field_name="submission__page", label='Funds', queryset=get_used_funds)
lead = Select2ModelMultipleChoiceFilter(label='Lead', queryset=get_project_leads) project_lead = Select2ModelMultipleChoiceFilter(field_name="lead", label='Lead', queryset=get_project_leads)
status = Select2MultipleChoiceFilter(label='Status', choices=PROJECT_STATUS_CHOICES) project_status = Select2MultipleChoiceFilter(field_name="status", label='Status', choices=PROJECT_STATUS_CHOICES)
query = filters.CharFilter(field_name='title', lookup_expr="icontains", widget=forms.HiddenInput) query = filters.CharFilter(field_name='title', lookup_expr="icontains", widget=forms.HiddenInput)
reporting = filters.ChoiceFilter( reporting = filters.ChoiceFilter(
choices=REPORTING_CHOICES, choices=REPORTING_CHOICES,
...@@ -57,7 +57,7 @@ class ProjectListFilter(filters.FilterSet): ...@@ -57,7 +57,7 @@ class ProjectListFilter(filters.FilterSet):
) )
class Meta: class Meta:
fields = ['status', 'lead', 'fund'] fields = ['project_status', 'project_lead', 'project_fund']
model = Project model = Project
def filter_reporting(self, queryset, name, value): def filter_reporting(self, queryset, name, value):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment