From 7339a0de48d0e9876e280c909f0bea1a097aba96 Mon Sep 17 00:00:00 2001 From: Andrew Nugged Date: Sat, 16 Oct 2021 01:16:16 +0300 Subject: [PATCH] Bug 20447: (QA follow-up) Fix framework switching bug Form's parameter never used because $record was always defined, with new or with existing holding, but always. Fixed by adding incoming $holding_id presence check. Signed-off-by: Nick Clemens --- cataloguing/addholding.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cataloguing/addholding.pl b/cataloguing/addholding.pl index 2eb509c95a..71bd3503d1 100755 --- a/cataloguing/addholding.pl +++ b/cataloguing/addholding.pl @@ -586,7 +586,7 @@ my ($template, $loggedinuser, $cookie) = get_template_and_user( my $record = $holding_id ? Koha::Holdings->find($holding_id) : Koha::Holding->new(); -$frameworkcode = $record->frameworkcode if ($record); +$frameworkcode = $record->frameworkcode if $holding_id && $record; $frameworkcode = 'HLD' if not $frameworkcode or $frameworkcode eq ''; # TODO: support in advanced editor? -- 2.37.2