Bugzilla – Attachment 152111 Details for
Bug 33844
item->is_denied_renewal should check column from associated pref
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33844: Fix is_denied_renewal
Bug-33844-Fix-isdeniedrenewal.patch (text/plain), 1.16 KB, created by
Nick Clemens (kidclamp)
on 2023-06-07 14:32:20 UTC
(
hide
)
Description:
Bug 33844: Fix is_denied_renewal
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2023-06-07 14:32:20 UTC
Size:
1.16 KB
patch
obsolete
>From 194c951cca638ecf885765763b331397a6e84304 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Fri, 26 May 2023 12:58:22 +0000 >Subject: [PATCH] Bug 33844: Fix is_denied_renewal > >Going via result_set->has_column does cost actually nothing if >the object is already there. > >Test plan: >Run again t/db_dependent/Koha/Item.t > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> >Signed-off-by: Nick Clemens <nick@bywatersolutions.com> >--- > Koha/Item.pm | 2 ++ > 1 file changed, 2 insertions(+) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index fe175a576c..619a307a61 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -2069,6 +2069,8 @@ sub is_denied_renewal { > my $denyingrules = C4::Context->yaml_preference('ItemsDeniedRenewal'); > return 0 unless $denyingrules; > foreach my $field (keys %$denyingrules) { >+ # Silently ignore bad column names; TODO we should validate elsewhere >+ next if !$self->_result->result_source->has_column($field); > my $val = $self->$field; > if( !defined $val) { > if ( any { !defined $_ } @{$denyingrules->{$field}} ){ >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33844
:
151759
|
151760
|
151785
|
151786
|
152110
| 152111