From a13fb458ba35978aeb9f40cd1079809b2eb9f5b0 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 2df4c164ba..3ab1ff12ba 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 $items = Koha::Items->search( { itemnumber => $self->{itemnumbers} } ); @@ -86,7 +86,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