Bug 18501: (follow-up) Do not rely on userenv->{branchcode}
[koha-equinox.git] / Koha / CirculationRules.pm
index 9bf1ab8..87062f5 100644 (file)
@@ -439,8 +439,8 @@ sub get_lostreturn_policy {
 
     my $behaviour = C4::Context->preference( 'RefundLostOnReturnControl' ) // 'CheckinLibrary';
     my $behaviour_mapping = {
-           CheckinLibrary => $params->{'return_branch'},
-           ItemHomeBranch => $item->homebranch,
+        CheckinLibrary    => $params->{'return_branch'} // $item->homebranch,
+        ItemHomeBranch    => $item->homebranch,
         ItemHoldingBranch => $item->holdingbranch
     };