Bug 28762: (QA follow-up) Restore protection against unknown itemtypes

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
(cherry picked from commit 5ff47fc40c)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
Nick Clemens 2024-07-22 19:02:22 +00:00 committed by Lucas Gass
parent 26d2a3e779
commit 41f690bca2
1 changed files with 2 additions and 1 deletions

View File

@ -1843,7 +1843,8 @@ Returns the effective not for loan status of the item
sub effective_not_for_loan_status {
my ($self) = @_;
my $itype_notforloan = $self->itemtype->notforloan;
my $itemtype = $self->itemtype;
my $itype_notforloan = $itemtype ? $itemtype->notforloan : undef;
return ( defined($itype_notforloan) && !$self->notforloan ) ? $itype_notforloan : $self->notforloan;
}