From ce9c97cda30ef32d4fa22a51c1a96f69ea9f18b0 Mon Sep 17 00:00:00 2001 From: Pedro Amorim Date: Fri, 25 Oct 2024 14:36:23 +0000 Subject: [PATCH] Bug 36822: Shibboleth - Add discard_changes Test plan: 1) Apply only Shibboleth tests patch 2) Run that test file: $ prove t/db_dependent/Auth_with_shibboleth.t 3) Verify tests fail with the updated_on error message. 4) Apply this patch. Repeat 2) Verify tests now pass. Co-authored-by: Martin Renvoize Signed-off-by: David Nind Signed-off-by: Katrin Fischer --- C4/Auth_with_shibboleth.pm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/C4/Auth_with_shibboleth.pm b/C4/Auth_with_shibboleth.pm index 3e6f42b57c..e3eb281cfc 100644 --- a/C4/Auth_with_shibboleth.pm +++ b/C4/Auth_with_shibboleth.pm @@ -135,6 +135,8 @@ sub _autocreate { } my $patron = Koha::Patron->new( \%borrower )->store; + $patron->discard_changes; + C4::Members::Messaging::SetMessagingPreferencesFromDefaults( { borrowernumber => $patron->borrowernumber, -- 2.39.5