[Koha-bugs] [Bug 25303] Koha::Objects->delete should not skip overridden object class ->delete
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Apr 30 10:23:12 CEST 2020
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25303
--- Comment #14 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
This follow-up is doing this:
- $holds->delete;
+ $biblio->holds->delete;
I was not expected such behaviour changes, it's not as easy as fixing the
tests. Did you check the occurrences in the code?
Maybe we should call ->reset before the loop instead?
@ Koha/Objects.pm:185 @ sub delete {
if ( Class::Inspector->function_exists( $self->object_class, 'delete' ) )
{
my $objects_deleted;
$self->_resultset->result_source->schema->txn_do( sub {
+ $self->reset;
while ( my $o = $self->next ) {
$o->delete;
$objects_deleted++;
--
You are receiving this mail because:
You are watching all bug changes.
More information about the Koha-bugs
mailing list