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

(-)a/tools/batchMod.pl (-1 / +6 lines)
Lines 183-195 if ($op eq "action") { Link Here
183
        }
183
        }
184
184
185
	# For each item
185
	# For each item
186
    my $can_edit = {};
186
	my $i = 1; 
187
	my $i = 1; 
187
	foreach my $itemnumber(@itemnumbers){
188
	foreach my $itemnumber(@itemnumbers){
188
189
189
		$job->progress($i) if $runinbackground;
190
		$job->progress($i) if $runinbackground;
191
190
        my $item = Koha::Items->find($itemnumber);
192
        my $item = Koha::Items->find($itemnumber);
191
        next unless $item; # Should have been tested earlier, but just in case...
193
        next unless $item; # Should have been tested earlier, but just in case...
192
        my $itemdata = $item->unblessed;
194
        my $itemdata = $item->unblessed;
195
196
        $can_edit->{ $item->homebranch } //= $patron->can_edit_item( $item->homebranch );
197
        next unless $can_edit->{ $item->homebranch };
198
193
        if ( $del ){
199
        if ( $del ){
194
            my $return = $item->safe_delete;
200
            my $return = $item->safe_delete;
195
            if (ref($return)) {
201
            if (ref($return)) {
196
- 

Return to bug 20256