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

(-)a/Koha/Object.pm (+3 lines)
Lines 551-556 Returns a representation of the object, suitable for API output. Link Here
551
551
552
sub to_api {
552
sub to_api {
553
    my ( $self, $params ) = @_;
553
    my ( $self, $params ) = @_;
554
555
    return unless $self->accessible;
556
554
    my $json_object = $self->TO_JSON;
557
    my $json_object = $self->TO_JSON;
555
558
556
    # Make sure we duplicate the $params variable to avoid
559
    # Make sure we duplicate the $params variable to avoid
(-)a/Koha/Patron.pm (-1 / +2 lines)
Lines 2299-2304 sub to_api { Link Here
2299
2299
2300
    my $json_patron = $self->SUPER::to_api( $params );
2300
    my $json_patron = $self->SUPER::to_api( $params );
2301
2301
2302
    return unless $json_patron;
2303
2302
    $json_patron->{restricted} = ( $self->is_debarred )
2304
    $json_patron->{restricted} = ( $self->is_debarred )
2303
                                    ? Mojo::JSON->true
2305
                                    ? Mojo::JSON->true
2304
                                    : Mojo::JSON->false;
2306
                                    : Mojo::JSON->false;
2305
- 

Return to bug 29523