diff --git a/Koha/Library/Group.pm b/Koha/Library/Group.pm index a486d35ecc..f85d715dbb 100644 --- a/Koha/Library/Group.pm +++ b/Koha/Library/Group.pm @@ -144,8 +144,8 @@ sub all_libraries { my @libraries; - push (@libraries, $self->libraries); - my @children = $self->children->search({ branchcode => undef }); + push (@libraries, $self->libraries->as_list); + my @children = $self->children->search({ branchcode => undef })->as_list; foreach my $c (@children) { push( @libraries, $c->all_libraries ); }