[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 12:12:37 CET 2020


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

--- Comment #26 from Jonathan Druart <jonathan.druart at bugs.koha-community.org> ---
Created attachment 96872
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=96872&action=edit
Bug 21684: Fix UploadedFile[s]->delete

Tests were failing with:
 #   Failed test 'Test delete via UploadedFile as well as UploadedFiles'
 #   at t/db_dependent/Upload.t line 193.
 DBIx::Class::Row::delete(): Not in database at /kohadevbox/koha/Koha/Object.pm
line 219

I am not sure this patch is perfect, a set of uploaded files should be
deleted in a transaction, which would be rollback if something is wrong.
But it will be tricky to restore the files after they have been deleted.
It seems that we should deal with that with a more complicated process
and should be part of a separate bug.

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


More information about the Koha-bugs mailing list