From e8d9c0e1a7fbe91294b009ef30f0db06d6010e39 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Wed, 13 Oct 2021 09:29:12 +0200 Subject: [PATCH] Bug 27526: Fix 'duplicate item' Signed-off-by: Jonathan Druart --- cataloguing/additem.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cataloguing/additem.pl b/cataloguing/additem.pl index 792e0fc793..52dd4bacb3 100755 --- a/cataloguing/additem.pl +++ b/cataloguing/additem.pl @@ -632,14 +632,14 @@ if ($op eq "additem") { } elsif ($op eq "dupeitem") { #------------------------------------------------------------------------------- # retrieve item if exist => then, it's a modif - my $item = Koha::Items->find($itemnumber); + $current_item = Koha::Items->find($itemnumber)->unblessed; # FIXME Handle non existent item if (C4::Context->preference('autoBarcode') eq 'incremental') { my ( $barcode ) = C4::Barcodes::ValueBuilder::incremental::get_barcode; - $item->barcode($barcode); + $current_item->{barcode} = $barcode; } else { - $item->barcode(undef); # Don't save it! + $current_item->{barcode} = undef; # Don't save it! } $nextop = "additem"; -- 2.39.5