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

(-)a/tools/batchMod.pl (-1 / +4 lines)
Lines 154-165 if ($op eq "action") { Link Here
154
        $schema->txn_do(
154
        $schema->txn_do(
155
            sub {
155
            sub {
156
                # For each item
156
                # For each item
157
                my $can_edit = {};
157
                my $i = 1;
158
                my $i = 1;
158
                foreach my $itemnumber (@itemnumbers) {
159
                foreach my $itemnumber (@itemnumbers) {
159
                    my $item = Koha::Items->find($itemnumber);
160
                    my $item = Koha::Items->find($itemnumber);
160
                    next
161
                    next
161
                      unless $item
162
                      unless $item
162
                      ; # Should have been tested earlier, but just in case...
163
                      ; # Should have been tested earlier, but just in case...
164
                    $can_edit->{ $item->homebranch } //= $patron->can_edit_item( $item->homebranch );
165
                    next unless $can_edit->{ $item->homebranch };
166
163
                    my $itemdata = $item->unblessed;
167
                    my $itemdata = $item->unblessed;
164
                    if ($del) {
168
                    if ($del) {
165
                        my $return = $item->safe_delete;
169
                        my $return = $item->safe_delete;
166
- 

Return to bug 20256