Fix for Reserves.t allow the tests to run without a logged in user

This commit is contained in:
Chris Cormack 2011-04-14 15:03:37 +12:00
parent a0c815033a
commit 67e3b86181

View file

@ -1924,7 +1924,7 @@ sub _GetCircControlBranch {
my $branch;
if ($circcontrol eq 'PickupLibrary') {
$branch= C4::Context->userenv->{'branch'};
$branch= C4::Context->userenv->{'branch'} if C4::Context->userenv;
} elsif ($circcontrol eq 'PatronLibrary') {
$branch=$borrower->{branchcode};
} else {