From c605ed609b91cf63e96ce5e419d71c58e8a817ea Mon Sep 17 00:00:00 2001 From: Martin Fenner Date: Tue, 9 Apr 2019 01:03:26 +0200 Subject: [PATCH] fixed syntax in works controller --- app/controllers/works_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/works_controller.rb b/app/controllers/works_controller.rb index 284ab1bb8..5481e78ac 100644 --- a/app/controllers/works_controller.rb +++ b/app/controllers/works_controller.rb @@ -76,7 +76,7 @@ def index query: params[:query], "member-id" => params[:provider_id], "data-center-id" => params[:client_id], - "page[cursor]" => Array.wrap(@dois.last[:sort]).first, + "page[cursor]" => page[:cursor].present? ? Array.wrap(@dois.last[:sort]).first : nil, "page[size]" => page[:size] }.compact.to_query }.compact options[:include] = @include