Bugzilla – Attachment 104018 Details for
Bug 25303
Koha::Objects->delete should not skip overridden object class ->delete
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25303: Call ->reset before iterate on the set
Bug-25303-Call--reset-before-iterate-on-the-set.patch (text/plain), 923 bytes, created by
Jonathan Druart
on 2020-04-30 11:26:07 UTC
(
hide
)
Description:
Bug 25303: Call ->reset before iterate on the set
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-30 11:26:07 UTC
Size:
923 bytes
patch
obsolete
>From e398b6b7591d6c22084a2b527d3ab3955ea498d9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 30 Apr 2020 13:24:30 +0200 >Subject: [PATCH] Bug 25303: Call ->reset before iterate on the set > >In case we already started to iterate. > >This fixes a failing tests in t/db_dependent/Koha/Biblios.t >--- > Koha/Objects.pm | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/Koha/Objects.pm b/Koha/Objects.pm >index b9697dc17b..eb77c0e0e6 100644 >--- a/Koha/Objects.pm >+++ b/Koha/Objects.pm >@@ -182,6 +182,7 @@ sub delete { > if ( Class::Inspector->function_exists( $self->object_class, 'delete' ) ) { > my $objects_deleted; > $self->_resultset->result_source->schema->txn_do( sub { >+ $self->reset; # If we iterated already over the set > while ( my $o = $self->next ) { > $o->delete; > $objects_deleted++; >-- >2.20.1
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 25303
:
103855
|
103859
|
103864
|
103865
|
103941
|
103998
| 104018 |
104027