Bugzilla – Attachment 184897 Details for
Bug 40555
Items with empty itemtype causes Preservation module to crash
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 40555: Consider possibility of item not having itemtype on effective_bookable
Bug-40555-Consider-possibility-of-item-not-having-.patch (text/plain), 774 bytes, created by
Pedro Amorim
on 2025-07-30 14:34:20 UTC
(
hide
)
Description:
Bug 40555: Consider possibility of item not having itemtype on effective_bookable
Filename:
MIME Type:
Creator:
Pedro Amorim
Created:
2025-07-30 14:34:20 UTC
Size:
774 bytes
patch
obsolete
>From c19aba7c571bde40b2d1efd31af4f7715b83dfae Mon Sep 17 00:00:00 2001 >From: Pedro Amorim <pedro.amorim@openfifth.co.uk> >Date: Wed, 30 Jul 2025 14:32:44 +0000 >Subject: [PATCH] Bug 40555: Consider possibility of item not having itemtype > on effective_bookable > >--- > Koha/Item.pm | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/Koha/Item.pm b/Koha/Item.pm >index eb36e62b06f..24764b74cd5 100644 >--- a/Koha/Item.pm >+++ b/Koha/Item.pm >@@ -2036,7 +2036,7 @@ Returns the effective bookability of the current item, be that item or itemtype > sub effective_bookable { > my ($self) = @_; > >- return $self->bookable // $self->itemtype->bookable; >+ return $self->bookable // ( $self->itemtype ? $self->itemtype->bookable : 0 ); > } > > =head3 orders >-- >2.39.5
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 40555
: 184897