From b7ca04b769939fce9ace24c456963f456f0fcbae Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 9 Jul 2018 14:05:29 -0400 Subject: [PATCH] Bug 21056: Changing the logged in library can fail sporadically We are getting reports that sometimes changing the logged in library via selectbranchprinter.pl sometimes appears to fail. Flushing the session after updating the branch appears to fix this. Test Plan: 1) Change your logged in library repeatedly. Hopefully ( sort of ) it will fail to change. You may want to try various browsers. 2) Apply this patch 3) Note the change no longer fails Signed-off-by: Jonathan Druart Signed-off-by: Nick Clemens (cherry picked from commit 76a06a7050643add32f4cbccbdc2fb00f66f5485) Signed-off-by: Martin Renvoize (cherry picked from commit 0a5dabc27174d5b77783f81c59248f5da8b37c79) Signed-off-by: Fridolin Somers --- circ/selectbranchprinter.pl | 1 + 1 file changed, 1 insertion(+) diff --git a/circ/selectbranchprinter.pl b/circ/selectbranchprinter.pl index 8099a38466..68a687efda 100755 --- a/circ/selectbranchprinter.pl +++ b/circ/selectbranchprinter.pl @@ -63,6 +63,7 @@ if ( $branch and my $library = Koha::Libraries->find($branch) ) { $template->param(LoginBranchcode => $branch); # update template for new branch $session->param('branchname', $branchname); # update sesssion in DB $session->param('branch', $branch); # update sesssion in DB + $session->flush(); push @updated, { updated_branch => 1, old_branch => $userenv_branch, -- 2.39.5