From dc2eccbeac03f9a15eaa60f35a9d2362fad1953f 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 (cherry picked from commit aa1d86920bd0392b4894fa2e756dcb41f2f7a5ec) Signed-off-by: Fridolin Somers (cherry picked from commit bdbd2c7225f347ab23770b0b09f8f86816353ada) Signed-off-by: Andrew Fuerste-Henry --- C4/Items.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Items.pm b/C4/Items.pm index 96328f6017..339aac869a 100644 --- a/C4/Items.pm +++ b/C4/Items.pm @@ -308,7 +308,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