From 754780bef498dff9cc511aef0a188b88d0b0fde1 Mon Sep 17 00:00:00 2001 From: Rogan Hamby Date: Wed, 3 Jun 2020 11:10:41 -0400 Subject: [PATCH] fixed xpath issues with restore_itemtypes --- kmig.d/bin/mig-import | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/kmig.d/bin/mig-import b/kmig.d/bin/mig-import index ccc30d6..4483c23 100755 --- a/kmig.d/bin/mig-import +++ b/kmig.d/bin/mig-import @@ -455,7 +455,7 @@ sub restore_itemtypes { $sth = $dbh->prepare($query); $sth->execute(); - foreach my $node ($dom->findnodes('/authorised_values/value')) { + foreach my $node ($dom->findnodes('/document/authorised_values/value')) { my $category = sql_str($node->findvalue('./category')); my $authvalue = sql_str($node->findvalue('./authvalue')); my $lib = sql_str($node->findvalue('./lib')); @@ -466,7 +466,7 @@ sub restore_itemtypes { $sth->execute(); } - foreach my $node ($dom->findnodes('/itemtypes/value')) { + foreach my $node ($dom->findnodes('/document/itemtypes/value')) { my $itemtype = sql_str($node->findvalue('./itemtype')); my $description = sql_str($node->findvalue('./description')); my $rentalcharge = sql_str($node->findvalue('./rentalcharge')); -- 1.7.2.5