diff --git a/misc/cronjobs/holds/holds_reminder.pl b/misc/cronjobs/holds/holds_reminder.pl index c0fabb2017..f580cd7374 100755 --- a/misc/cronjobs/holds/holds_reminder.pl +++ b/misc/cronjobs/holds/holds_reminder.pl @@ -228,14 +228,14 @@ foreach my $branchcode (@branchcodes) { #BEGIN BRANCH LOOP # Check that this branch has the letter code specified or skip this branch # FIXME What if we don't want to default if the translated template does not exist? - my $template_exists = Koha::Notice::Templates->search( + my $template_exists = Koha::Notice::Templates->find_effective_template( { module => 'reserves', code => $lettercode, branchcode => $branchcode, lang => 'default', } - )->count; + ); unless ($template_exists) { $verbose and print qq|Message '$lettercode' content not found for $branchcode\n|; next;