Bugzilla – Attachment 124578 Details for
Bug 28960
EDI transfer_items uses a relationship where it's looking for a field
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 28960: Explicitly call get_column
Bug-28960-Explicitly-call-getcolumn.patch (text/plain), 1.34 KB, created by
Kyle M Hall (khall)
on 2021-09-07 12:36:45 UTC
(
hide
)
Description:
Bug 28960: Explicitly call get_column
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2021-09-07 12:36:45 UTC
Size:
1.34 KB
patch
obsolete
>From cfa701151fd0ecd368c8735a9f8d349e382e279b Mon Sep 17 00:00:00 2001 >From: Martin Renvoize <martin.renvoize@ptfs-europe.com> >Date: Tue, 7 Sep 2021 12:14:03 +0100 >Subject: [PATCH] Bug 28960: Explicitly call get_column > >This patch adds get_column to ensure we are returning a string value of >a field rather than accidentally triggering a relationship accessor. > >Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> >--- > Koha/EDI.pm | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > >diff --git a/Koha/EDI.pm b/Koha/EDI.pm >index 7a09ee367b..e4e7478259 100644 >--- a/Koha/EDI.pm >+++ b/Koha/EDI.pm >@@ -446,7 +446,7 @@ sub receipt_items { > "Cannot find aqorder item for $i :Order:$ordernumber"); > next; > } >- my $b = $item->homebranch->branchcode; >+ my $b = $item->get_column('homebranch'); > if ( !exists $branch_map{$b} ) { > $branch_map{$b} = []; > } >@@ -543,7 +543,7 @@ sub transfer_items { > foreach my $ilink (@item_links) { > my $ino = $ilink->itemnumber; > my $item = $schema->resultset('Item')->find( $ilink->itemnumber ); >- my $i_branch = $item->homebranch; >+ my $i_branch = $item->get_column('homebranch'); > if ( exists $mapped_by_branch{$i_branch} > && $mapped_by_branch{$i_branch} > 0 ) > { >-- >2.30.1 (Apple Git-130)
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 28960
:
124572
| 124578