diff --git a/Koha/Library/Group.pm b/Koha/Library/Group.pm index 4a4ea03274..59b2e18c2b 100644 --- a/Koha/Library/Group.pm +++ b/Koha/Library/Group.pm @@ -145,14 +145,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;