View | Details | Raw Unified | Return to bug 33885
Collapse All | Expand All

(-)a/Koha/Acquisition/Order.pm (+1 lines)
Lines 425-430 Retrieves patron that created this order. Link Here
425
sub creator {
425
sub creator {
426
    my ( $self )  = @_;
426
    my ( $self )  = @_;
427
    my $creator_rs = $self->_result->creator;
427
    my $creator_rs = $self->_result->creator;
428
    return unless $creator_rs;
428
    return Koha::Patron->_new_from_dbic( $creator_rs );
429
    return Koha::Patron->_new_from_dbic( $creator_rs );
429
}
430
}
430
431
(-)a/t/db_dependent/Koha/Acquisition/Order.t (-2 / +5 lines)
Lines 639-645 subtest 'filter_by_current & filter_by_cancelled' => sub { Link Here
639
};
639
};
640
640
641
subtest 'creator ()' => sub {
641
subtest 'creator ()' => sub {
642
    plan tests => 1;
642
    plan tests => 2;
643
643
644
    $schema->storage->txn_begin;
644
    $schema->storage->txn_begin;
645
645
Lines 650-655 subtest 'creator ()' => sub { Link Here
650
650
651
    is($creator->borrowernumber, $patron->borrowernumber, 'Patron is order creator');
651
    is($creator->borrowernumber, $patron->borrowernumber, 'Patron is order creator');
652
652
653
    $creator->delete;
654
655
    is( $order->get_from_storage->creator, undef );
656
653
    $schema->storage->txn_rollback;
657
    $schema->storage->txn_rollback;
654
};
658
};
655
659
656
- 

Return to bug 33885