Bugzilla – Attachment 111994 Details for
Bug 6819
Don't offer cancel order links for received order lines on basket summary
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 26515: Don't need to call safe_to_delete
Bug-26515-Dont-need-to-call-safetodelete.patch (text/plain), 1.42 KB, created by
Séverine Queune
on 2020-10-19 14:19:05 UTC
(
hide
)
Description:
Bug 26515: Don't need to call safe_to_delete
Filename:
MIME Type:
Creator:
Séverine Queune
Created:
2020-10-19 14:19:05 UTC
Size:
1.42 KB
patch
obsolete
>From 5f7a9af0322a5b52d6fed38cd55bdf580e6a29cd Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 15 Oct 2020 15:17:46 +0200 >Subject: [PATCH] Bug 26515: Don't need to call safe_to_delete >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Signed-off-by: Séverine QUEUNE <severine.queune@bulac.fr> > >https://bugs.koha-community.org/show_bug.cgi?id=6819 >--- > Koha/Acquisition/Order.pm | 9 +++------ > 1 file changed, 3 insertions(+), 6 deletions(-) > >diff --git a/Koha/Acquisition/Order.pm b/Koha/Acquisition/Order.pm >index c913a29..07dea68 100644 >--- a/Koha/Acquisition/Order.pm >+++ b/Koha/Acquisition/Order.pm >@@ -127,15 +127,12 @@ sub cancel { > # Delete the related items > my $items = $self->items; > while ( my $item = $items->next ) { >- my $safe_to_delete = $item->safe_to_delete; >- if ( $safe_to_delete eq '1' ) { >- $item->safe_delete; >- } >- else { >+ my $deleted = $item->safe_delete; >+ unless ( ref($deleted) eq 'Koha::Item' ) { > $self->add_message( > { > message => 'error_delitem', >- payload => { item => $item, reason => $safe_to_delete } >+ payload => { item => $item, reason => $deleted } > } > ); > } >-- >2.1.4
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 6819
:
5226
|
111951
|
111994
|
111996
|
112106