Bug 21910: Does not deal with call context, ->search does already
authorJonathan Druart <jonathan.druart@bugs.koha-community.org>
Thu, 6 Dec 2018 15:53:24 +0000 (12:53 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 12 Dec 2018 10:44:00 +0000 (10:44 +0000)
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
(cherry picked from commit 21372f78f825c0ec439ea4a7cfe7dff6656467b9)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

Koha/Library/Groups.pm

index d4521b0..1ce2cb0 100644 (file)
@@ -62,9 +62,7 @@ sub get_search_groups {
 
     my $field = $interface eq 'staff' ? 'ft_search_groups_staff' : 'ft_search_groups_opac';
 
-    my $search_groups = $self->search( { $field => 1 } );
-
-    return wantarray ? $search_groups->as_list : $search_groups;
+    return $self->search( { $field => 1 } );
 }
 
 =head3 type