diff --git a/Koha/Item.pm b/Koha/Item.pm index e508e7eb55..1174519483 100644 --- a/Koha/Item.pm +++ b/Koha/Item.pm @@ -301,7 +301,7 @@ sub safe_to_delete { # check it doesn't have a waiting reserve $error = "book_reserved" - if $self->holds->search( { found => [ 'W', 'T' ] } )->count; + if $self->holds->filter_by_found->count; $error = "linked_analytics" if C4::Items::GetAnalyticsCount( $self->itemnumber ) > 0;