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> Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> (cherry picked from commitc3ef810a54) Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com> (cherry picked from commit9dbf469605) Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> (cherry picked from commitbe4fbeff29) Signed-off-by: Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> (cherry picked from commitbe4fbeff29)
This commit is contained in:
parent
a1fd716fc6
commit
d6bce50b8b
|
|
@ -412,7 +412,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} = [];
|
||||
}
|
||||
|
|
@ -509,7 +509,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 )
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in New Issue