From 4ee63d70e6e987c2c25a1f61ada463d5e6657346 Mon Sep 17 00:00:00 2001 From: Kyle Hall Date: Fri, 29 Apr 2022 08:04:53 -0400 Subject: [PATCH] Bug 20256: (QA follow-up) Fix explosion for items batch edit --- Koha/UI/Table/Builder/Items.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Koha/UI/Table/Builder/Items.pm b/Koha/UI/Table/Builder/Items.pm index 5706321990..5914339c12 100644 --- a/Koha/UI/Table/Builder/Items.pm +++ b/Koha/UI/Table/Builder/Items.pm @@ -72,7 +72,7 @@ Use it with: sub build_table { my ( $self, $params ) = @_; - my $patron = $self->params; + my $patron = $params->{patron}; my %itemnumbers_to_idx = map { $self->{itemnumbers}->[$_] => $_ } 0..$#{$self->{itemnumbers}}; @@ -89,7 +89,7 @@ sub build_table { holds => $item->biblio->holds->count, item_holds => $item->holds->count, is_checked_out => $item->checkout || 0, - nomod => $patron ? 0 : $patron->can_edit_item($item), + nomod => $patron ? !$patron->can_edit_item($item) : 0, }; push @items, $item_info; } -- 2.30.2