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

--- Comment #4 from Martin Renvoize <[email protected]> ---
(In reply to Jonathan Druart from comment #3)
> Isn't the correct fix to call $item->home_branch->branchcode?
> 
> From Koha::Item
> 
> sub home_branch {
>     my ($self) = @_;
> 
>     $self->{_home_branch} ||= Koha::Libraries->find( $self->homebranch() );
> 
>     return $self->{_home_branch};
> }

There are two things with that.

1) $item is a DBIx::Class::Result and not a Koha::Item in EDI (Yes, we should
certainly convert to Koha Objects here at some point)
2) if all we need is the code, why call through another DB hitting accessor
rather than use the field in the first set directly?

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to