LP#1667115 - Silence config.hard_due_date warning user/stompro/lp1667115_log_noise_hard_due_date
authorJosh Stompro <stomproj@larl.org>
Thu, 23 Feb 2017 19:38:12 +0000 (13:38 -0600)
committerJosh Stompro <stomproj@larl.org>
Thu, 23 Feb 2017 19:38:12 +0000 (13:38 -0600)
For every checkout where a hard due date isn't used there is a log
warning of "retrieve config.hard_due_date called with no ID...".

This fix silences that warning.

Signed-off-by: Josh Stompro <stomproj@larl.org>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/Circulate.pm

index 7dd3611..6ece1a0 100644 (file)
@@ -1054,7 +1054,9 @@ sub run_indb_circ_test {
             $self->circ_matrix_matchpoint->recurring_fine_rule->grace_period($results->[0]->{grace_period});
         }
         $self->circ_matrix_matchpoint->max_fine_rule($self->editor->retrieve_config_rules_max_fine($results->[0]->{max_fine_rule}));
-        $self->circ_matrix_matchpoint->hard_due_date($self->editor->retrieve_config_hard_due_date($results->[0]->{hard_due_date}));
+        if(defined($results->[0]->{hard_due_date})) {
+            $self->circ_matrix_matchpoint->hard_due_date($self->editor->retrieve_config_hard_due_date($results->[0]->{hard_due_date}));
+        }
         # Grab the *last* response for limit_groups, where it is more likely to be filled
         $self->limit_groups($results->[-1]->{limit_groups});
     }