From 745c7cf650096ba9458259ccc516918dbf62953c Mon Sep 17 00:00:00 2001 From: Andrew Nugged Date: Mon, 3 Jan 2022 12:44:07 +0200 Subject: [PATCH] Bug 20447: (QA follow-up) bugfix: undefined holding_id in code after storing to db not allows for interface to go back to newly created holding --- cataloguing/addholding.pl | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cataloguing/addholding.pl b/cataloguing/addholding.pl index c78c11a4a4..55e8fad6ff 100755 --- a/cataloguing/addholding.pl +++ b/cataloguing/addholding.pl @@ -618,7 +618,9 @@ if ($op eq 'add') { $record->set_marc({ record => $marc }); $record->store(); - if ($redirect eq 'items' || ($mode ne 'popup' && !$holding_id && $redirect ne 'view' && $redirect ne 'just_save')) { + $holding_id = $record->holding_id; + + if ($redirect eq 'items' || ($mode ne 'popup' && $redirect ne 'view' && $redirect ne 'just_save')) { print $input->redirect("/cgi-bin/koha/catalogue/detail.pl?biblionumber=$biblionumber&searchid=$searchid"); exit; } elsif ($holding_id && $redirect eq 'view') { -- 2.35.1