View | Details | Raw Unified | Return to bug 20256
Collapse All | Expand All

(-)a/tools/batchMod.pl (-1 / +5 lines)
Lines 178-189 if ($op eq "action") { Link Here
178
            $schema->txn_do(
178
            $schema->txn_do(
179
                sub {
179
                sub {
180
                    # For each item
180
                    # For each item
181
                    my $can_edit = {};
181
                    my $i = 1;
182
                    my $i = 1;
182
                    foreach my $itemnumber (@itemnumbers) {
183
                    foreach my $itemnumber (@itemnumbers) {
183
                        my $item = Koha::Items->find($itemnumber);
184
                        my $item = Koha::Items->find($itemnumber);
184
                        next
185
                        next
185
                          unless $item
186
                          unless $item
186
                          ; # Should have been tested earlier, but just in case...
187
                          ; # Should have been tested earlier, but just in case...
188
189
                        $can_edit->{ $item->homebranch } //= $patron->can_edit_item( $item->homebranch );
190
                        next unless $can_edit->{ $item->homebranch };
191
187
                        my $itemdata = $item->unblessed;
192
                        my $itemdata = $item->unblessed;
188
                        if ($del) {
193
                        if ($del) {
189
                            my $return = $item->safe_delete;
194
                            my $return = $item->safe_delete;
190
- 

Return to bug 20256