Bug 24670: (QA follow-up) Add missing $rules definition
authorMartin Renvoize <martin.renvoize@ptfs-europe.com>
Wed, 19 Feb 2020 21:30:22 +0000 (21:30 +0000)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Thu, 20 Feb 2020 08:41:35 +0000 (08:41 +0000)
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Lisette Scheer <lisettes@latahlibrary.org>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>

admin/smart-rules.pl

index 45c566e..236ca8f 100755 (executable)
@@ -565,6 +565,7 @@ my $humanbranch = ( $branch ne '*' ? $branch : undef );
 my $all_rules = Koha::CirculationRules->search({ branchcode => $humanbranch });
 my $definedbranch = $all_rules->count ? 1 : 0;
 
+my $rules = {};
 while ( my $r = $all_rules->next ) {
     $r = $r->unblessed;
     $rules->{ $r->{categorycode} }->{ $r->{itemtype} }->{ $r->{rule_name} } = $r->{rule_value};