X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=catagits%2FCatalyst-Controller-DBIC-API.git;a=blobdiff_plain;f=lib%2FCatalyst%2FController%2FDBIC%2FAPI.pm;h=8d343d0ae0fac95275483215aa77da910c1b9619;hp=561508ac43bcff13cdd5c5ad9dbc7038e6b9a100;hb=df8f312140b52107da652cab7907e26bc7a1b0da;hpb=c9b8a7980c40fed5f81423f48a2c369f81348ce7 diff --git a/lib/Catalyst/Controller/DBIC/API.pm b/lib/Catalyst/Controller/DBIC/API.pm index 561508a..8d343d0 100644 --- a/lib/Catalyst/Controller/DBIC/API.pm +++ b/lib/Catalyst/Controller/DBIC/API.pm @@ -221,7 +221,7 @@ sub deserialize :ActionClass('Deserialize') { $req_params = CGI::Expand->expand_hash($c->req->params); - foreach my $param (@{[$self->search_arg, $self->count_arg, $self->page_arg, $self->ordered_by_arg, $self->grouped_by_arg, $self->prefetch_arg]}) + foreach my $param (@{[$self->search_arg, $self->count_arg, $self->page_arg, $self->offset_arg, $self->ordered_by_arg, $self->grouped_by_arg, $self->prefetch_arg]}) { # these params can also be composed of JSON # but skip if the parameter is not provided @@ -369,7 +369,7 @@ sub list_perform_search $req->_set_current_result_set($rs); $req->_set_search_total_entries($req->current_result_set->pager->total_entries) - if $req->has_search_attributes && $req->search_attributes->{page}; + if $req->has_search_attributes && (exists($req->search_attributes->{page}) && defined($req->search_attributes->{page}) && length($req->search_attributes->{page})); } catch {