Bug 19190: [Follow-up] Do not rely on the return of ModItem
touch_all_items looks at the return of ModItem to determine if the operation was successful. But ModItem does not return a meaningful value. This patch puts the ModItem call in an eval and looks at $@. Test plan: Run touch_all_items with a where condition and verbose option. Put print 1/0; at the end of ModItem. Run touch_all_items again. You should see: ERROR WITH ITEM xxx !!!! Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: David Bourgault <david.bourgault@inlibro.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
b3b86caaa5
commit
1fc0b65254
|
|
@ -79,7 +79,8 @@ $sth_fetch->execute();
|
|||
# fetch info from the search
|
||||
while (my ($biblionumber, $itemnumber, $itemcallnumber) = $sth_fetch->fetchrow_array){
|
||||
|
||||
my $modok = ModItem({itemcallnumber => $itemcallnumber}, $biblionumber, $itemnumber);
|
||||
eval { ModItem({itemcallnumber => $itemcallnumber}, $biblionumber, $itemnumber); };
|
||||
my $modok = $@ ? 0 : 1;
|
||||
|
||||
if ($modok) {
|
||||
$goodcount++;
|
||||
|
|
|
|||
Loading…
Reference in New Issue