Skip to content

Commit 40ac10a

Browse files
committed
Issue #329 - skip links if pageSize == 0
Signed-off-by: John T.E. Timm <johntimm@us.ibm.com>
1 parent 476ea6f commit 40ac10a

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

fhir-server/src/main/java/com/ibm/fhir/server/resources/FHIRResource.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3894,7 +3894,8 @@ private Bundle addLinks(FHIRPagingContext context, Bundle bundle, String request
38943894
// If for search with _summary=count, then don't add previous and next links.
38953895
if (!(context instanceof FHIRSearchContext
38963896
&& ((FHIRSearchContext) context).getSummaryParameter() != null
3897-
&& ((FHIRSearchContext) context).getSummaryParameter().equals(SummaryValueSet.COUNT))) {
3897+
&& ((FHIRSearchContext) context).getSummaryParameter().equals(SummaryValueSet.COUNT))
3898+
&& ((FHIRSearchContext) context).getPageSize() > 0) {
38983899
int nextPageNumber = context.getPageNumber() + 1;
38993900
if (nextPageNumber <= context.getLastPageNumber()) {
39003901

0 commit comments

Comments
 (0)