From 70548a31b8595b0cfff55686c2c886133cb6621f Mon Sep 17 00:00:00 2001 From: timparsons Date: Thu, 31 Aug 2023 09:46:13 -0400 Subject: [PATCH] BreedBase was paginating its response to POST requests to the /studies endpoint, so not all created objects would be contained in the response, which is inconsistent with the BrAPI spec. --- lib/CXGN/BrAPI/v2/Studies.pm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/CXGN/BrAPI/v2/Studies.pm b/lib/CXGN/BrAPI/v2/Studies.pm index 6c6e7e1ef3..cbeb6b3d2f 100644 --- a/lib/CXGN/BrAPI/v2/Studies.pm +++ b/lib/CXGN/BrAPI/v2/Studies.pm @@ -340,12 +340,13 @@ sub store { return { error => $references->{'error'} }; } } - - } my $data_out; my $total_count=0; + # This is servicing a POST request, make sure pagination returns all created objects. + $page_size = scalar(@study_dbids); + $page = 0; if (scalar(@study_dbids)>0){ my $dbh = $c->dbc->dbh(); my $bs = CXGN::BreederSearch->new( { dbh=>$dbh, dbname=>$c->config->{dbname}, } );