diff --git a/Koha/Library/Group.pm b/Koha/Library/Group.pm index aaf68530d5..ea9ed134eb 100644 --- a/Koha/Library/Group.pm +++ b/Koha/Library/Group.pm @@ -144,14 +144,10 @@ sub all_libraries { my @libraries; - my @children = $self->children; + push (@libraries, $self->libraries); + my @children = $self->children->search({ branchcode => undef }); foreach my $c (@children) { - if ( $c->branchcode ) { - push( @libraries, $c->library ); - } - else { - push( @libraries, $c->all_libraries ); - } + push( @libraries, $c->all_libraries ); } my %seen;