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

(-)a/Koha/REST/Plugin/Objects.pm (-2 / +6 lines)
Lines 18-23 package Koha::REST::Plugin::Objects; Link Here
18
use Modern::Perl;
18
use Modern::Perl;
19
19
20
use Mojo::Base 'Mojolicious::Plugin';
20
use Mojo::Base 'Mojolicious::Plugin';
21
use Try::Tiny;
21
22
22
use JSON;
23
use JSON;
23
24
Lines 114-120 sub register { Link Here
114
            }
115
            }
115
            # Perform search
116
            # Perform search
116
            my $objects = $result_set->search( $filtered_params, $attributes );
117
            my $objects = $result_set->search( $filtered_params, $attributes );
117
            my $total   = $result_set->search->count;
118
            my $total = try {
119
                $result_set->search->count;
120
            } catch {
121
                warn "Caught in REST Plugin\n";
122
            };
118
123
119
            $c->add_pagination_headers(
124
            $c->add_pagination_headers(
120
                {
125
                {
121
- 

Return to bug 27680