From aa1d86920bd0392b4894fa2e756dcb41f2f7a5ec Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Thu, 4 Mar 2021 10:30:31 -0500 Subject: [PATCH] Bug 27837: Permanent location to be empty string, check if key exists Signed-off-by: Katrin Fischer Signed-off-by: Martin Renvoize Signed-off-by: Jonathan Druart --- C4/Items.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Items.pm b/C4/Items.pm index e2f81d0bef..3ba49a2477 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -304,7 +304,7 @@ sub ModItemFromMarc { my $item_object = Koha::Items->find($itemnumber); my $item = TransformMarcToKoha( $localitemmarc, $frameworkcode, 'items' ); - my $has_permanent_location = $item->{permanent_location}; + my $has_permanent_location = exists $item->{permanent_location}; # Retrieving the values for the fields that are not linked my @mapped_fields = Koha::MarcSubfieldStructures->search( -- 2.39.5