From 939536fb7ca61415233c358909ef79d3c9bcc732 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ant=C3=B3nio=20Lindo?= Date: Mon, 2 Dec 2024 15:48:06 +0000 Subject: [PATCH] fixed filter problem (#432) --- .../databasepreservation/common/api/v1/DatabaseResource.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/com/databasepreservation/common/api/v1/DatabaseResource.java b/src/main/java/com/databasepreservation/common/api/v1/DatabaseResource.java index ee360727..415393d6 100644 --- a/src/main/java/com/databasepreservation/common/api/v1/DatabaseResource.java +++ b/src/main/java/com/databasepreservation/common/api/v1/DatabaseResource.java @@ -324,7 +324,7 @@ private Filter getDatabaseFindFilterForUser(User user, Filter searchFilter) { } } else if (filterParameter instanceof BasicSearchFilterParameter searchFilterParameter) { String searchValue = searchFilterParameter.getValue(); - permissionFilterParameters.add(new SimpleFilterParameter(ViewerConstants.INDEX_SEARCH, searchValue)); + permissionFilterParameters.add(new BasicSearchFilterParameter(ViewerConstants.INDEX_SEARCH, searchValue)); } } } @@ -337,7 +337,7 @@ private Filter getDatabaseFindFilterForUser(User user, Filter searchFilter) { permissionFilterParameters.add(new OrFiltersParameters(permissionsOrFilterParameters)); - return new Filter(new AndFiltersParameters(permissionFilterParameters)); + return new Filter(permissionFilterParameters); } @Override