From b11f4f7dcaeab84767757d7bf9aa41ab647ad684 Mon Sep 17 00:00:00 2001 From: Jochen Klar Date: Fri, 24 Jan 2025 13:43:29 +0100 Subject: [PATCH] Fix search endpoint --- rdmo/projects/viewsets.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rdmo/projects/viewsets.py b/rdmo/projects/viewsets.py index 4d093e24f..6f2f6699e 100644 --- a/rdmo/projects/viewsets.py +++ b/rdmo/projects/viewsets.py @@ -873,6 +873,8 @@ def search(self, request): options = request.GET.getlist('options') if options: queryset = queryset.filter(option__in=options) + else: + queryset = queryset.filter(option=None) if is_truthy(request.GET.get('collection')): # if collection is set (for checkboxes), we first select each distinct set and create a Q object with it