Bugzilla – Attachment 96180 Details for
Bug 24213
Koha::Object->get_from_storage should return undef if the object has been deleted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24213: Fix Koha::Object->get_from_storage if the object has been deleted
Bug-24213-Fix-KohaObject-getfromstorage-if-the-obj.patch (text/plain), 1.04 KB, created by
Jonathan Druart
on 2019-12-11 08:41:12 UTC
(
hide
)
Description:
Bug 24213: Fix Koha::Object->get_from_storage if the object has been deleted
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2019-12-11 08:41:12 UTC
Size:
1.04 KB
patch
obsolete
>From b6592674df708878372ecb66ed6ecb5cd5c88e3c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 11 Dec 2019 09:39:30 +0100 >Subject: [PATCH] Bug 24213: Fix Koha::Object->get_from_storage if the object > has been deleted > >Without this patch it fails with something like: > DBIC result _type isn't of the _type Subscription at t/db_dependent/Biblio.t line 627. > >Test plan: >- Apply the first patch (Add tests) >- Confirm that they fail >- Apply this patch >- Confirm that the tests pass >--- > Koha/Object.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/Object.pm b/Koha/Object.pm >index ce4c231591..00e0f4d231 100644 >--- a/Koha/Object.pm >+++ b/Koha/Object.pm >@@ -279,6 +279,7 @@ sub unblessed { > sub get_from_storage { > my ( $self, $attrs ) = @_; > my $stored_object = $self->_result->get_from_storage($attrs); >+ return unless $stored_object; > my $object_class = Koha::Object::_get_object_class( $self->_result->result_class ); > return $object_class->_new_from_dbic($stored_object); > } >-- >2.11.0
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 24213
:
96179
|
96180
|
98175
|
98176
|
98203
|
98204