From f1009bbb6ec7132e135516437c1b598f68c63828 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Wed, 3 Jul 2019 09:21:15 -0400 Subject: [PATCH] Bug 23165: (QA follow-up) Don't set if it's already set for non-opac calls --- C4/Circulation.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/C4/Circulation.pm b/C4/Circulation.pm index 82496fb13c..d7ed735bd1 100644 --- a/C4/Circulation.pm +++ b/C4/Circulation.pm @@ -2972,9 +2972,8 @@ sub AddRenewal { $branch = 'OPACRenew'; } } - else { - $branch = - C4::Context->userenv ? C4::Context->userenv->{branch} : $branch; + elsif ( !$branch && C4::Context->userenv ) { + $branch = C4::Context->userenv->{branch}; } # Add the renewal to stats -- 2.20.1 (Apple Git-117)