diff --git a/suggestion/suggestion.pl b/suggestion/suggestion.pl index 0e5ec8f80a..f85b4366ea 100755 --- a/suggestion/suggestion.pl +++ b/suggestion/suggestion.pl @@ -411,9 +411,8 @@ if ($op=~/else/) { || $search_params->{$f} eq ''; } - my @suggestions = - Koha::Suggestions->search_limited( - { %$search_params, archived => $filter_archived } )->as_list; + $search_params->{archived} = 0 if !$filter_archived; + my @suggestions = Koha::Suggestions->search_limited($search_params)->as_list; push @allsuggestions, {