[Koha-bugs] [Bug 21684] Koha::Object[s]->delete methods must behave identically as the corresponding DBIx::Class ones

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Tue Jan 7 14:42:15 CET 2020


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21684

--- Comment #31 from Marcel de Rooy <m.de.rooy at rijksmuseum.nl> ---
How do we view this line now in both modules?
    return $rv==0 ? "0E0" : $rv;
Also in delete_missing.
The Upload.t test also refers to -1 values. Are they still possible? At first
glance the test should still be adjusted a bit more, although it passes now.

Second patch
+    my $deleted = $self->_result()->delete;
+    if ( ref $deleted ) {
+        my $object_class  = Koha::Object::_get_object_class(
$self->_result->result_class );
+        $deleted = $object_class->_new_from_dbic($deleted);
+    }
+    return $deleted;
Isnt this a bit expensive to do since we will generally not even look at what
we get back?
Most often $obj->delete is not even tested.
Parameterize the return??

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list