From cbf9220dfef0adfc5190ef5cf734600cd7d3ed2a Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 25 Aug 2021 12:27:12 +0200 Subject: [PATCH] Bug 28895: Don't use NewItemsDefaultLocation for items edition --- cataloguing/additem.pl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index e0992152562..d29ed79ffbd 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -164,7 +164,10 @@ sub generate_subfield_form { } my $default_location = C4::Context->preference('NewItemsDefaultLocation'); - if ( !$value && $subfieldlib->{kohafield} eq 'items.location' && $default_location ) { + if ( !$item # $item is defined only on item creation + && ! $value + && $subfieldlib->{kohafield} eq 'items.location' + && $default_location ) { $value = $default_location; } -- 2.25.1