Bug 28255: Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl
authorNick Clemens <nick@bywatersolutions.com>
Wed, 28 Apr 2021 17:56:11 +0000 (17:56 +0000)
committerFridolin Somers <fridolin.somers@biblibre.com>
Thu, 20 May 2021 12:52:48 +0000 (14:52 +0200)
commitbac2651c609a04afa5fc802d2f7092e8b4ab76c6
tree94c92cce0312ee63a5a19f2ee35e56a69e686be8
parentb56b902f730cc1178498ae4cbc9ad9f60504f1cc
Bug 28255: Follow up to bug 23463 - use item_object in misc/cronjobs/delete_items.pl

This looks like just an assumption that the $item variable was an object

Correct the code to use $item_object

To test:
1 - perl misc/cronjobs/delete_items.pl -where="barcode LIKE '%8'" --commit --verbose
2 - Can't call method "safe_delete" on unblessed reference at /usr/share/koha/bin/cronjobs/delete_items.pl line 67.
3 - Apply patch
4 - Repeat
5 - Success! You deleted a bunch of items

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(cherry picked from commit 423421eb64f0130d9cb194e572f4ca89937b02a4)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
misc/cronjobs/delete_items.pl