Bug 22690: (QA follow-up) Use relationship accessor
With the addition of foreign key relationships to the linktracker table we now get a DBIC relationship accessor we can use. This clarifies the code slightly by using the _result->relationship form to get the DBIC resultset. We should still introduce a Koha::Object based class for this table at some point. Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
This commit is contained in:
parent
8e19ecd51e
commit
2e5bfbc5a7
|
|
@ -1255,9 +1255,7 @@ sub move_to_biblio {
|
|||
);
|
||||
|
||||
# linktrackers (there's no Koha object set available yet)
|
||||
# direct lookup as there's no foreign key relationship yet
|
||||
my $schema = Koha::Database->new()->schema();
|
||||
my $linktrackers = $schema->resultset('Linktracker')->search({ itemnumber => $self->itemnumber });
|
||||
my $linktrackers = $self->_result->linktrackers;
|
||||
$linktrackers->update_all({ biblionumber => $to_biblionumber });
|
||||
|
||||
return $to_biblionumber;
|
||||
|
|
|
|||
Loading…
Reference in New Issue