@@ -, +, @@ than a method --- Koha/Club.pm | 12 ------------ clubs/clubs.pl | 2 +- 2 files changed, 1 insertion(+), 13 deletions(-) --- a/Koha/Club.pm +++ a/Koha/Club.pm @@ -39,18 +39,6 @@ Koha::Club - Koha Club Object class =cut -=head3 club_template - -=cut - -sub club_template { - my ($self) = @_; - - return unless $self->club_template_id(); - - return Koha::Club::Templates->find( $self->club_template_id() ); -} - =head3 club_fields =cut --- a/clubs/clubs.pl +++ a/clubs/clubs.pl @@ -47,7 +47,7 @@ my $club_template = $club_template_id ? Koha::Club::Templates->find( $club_templ my $club = $club_id ? Koha::Clubs->find( $club_id ) : undef; my @club_templates = Koha::Club::Templates->search(); -my @clubs = Koha::Clubs->search(); +my @clubs = Koha::Clubs->search({}, { prefetch => 'club_template' }); $template->param( stored => $stored, --