From 0c8a0afbc3b24a2ddfc50fbf9dac7385840edbe1 Mon Sep 17 00:00:00 2001 From: Struchkov Mark Date: Mon, 14 Feb 2022 10:04:35 +0300 Subject: [PATCH] release-0.3.1 --- pom.xml | 2 +- .../java/dev/struchkov/haiti/filter/quarkus/CriteriaFilter.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pom.xml b/pom.xml index 9d5b7d5..daeaf6e 100644 --- a/pom.xml +++ b/pom.xml @@ -6,7 +6,7 @@ dev.struchkov.haiti.filter haiti-filter-quarkus-reactive - 0.3.0 + 0.3.1 jar Haiti Filter Reactive Quarkus diff --git a/src/main/java/dev/struchkov/haiti/filter/quarkus/CriteriaFilter.java b/src/main/java/dev/struchkov/haiti/filter/quarkus/CriteriaFilter.java index b379d7f..83eb310 100644 --- a/src/main/java/dev/struchkov/haiti/filter/quarkus/CriteriaFilter.java +++ b/src/main/java/dev/struchkov/haiti/filter/quarkus/CriteriaFilter.java @@ -116,7 +116,7 @@ public class CriteriaFilter { totalElements, results.size(), results ) .page(offset.getPageNumber()) - .totalPages(totalElements / results.size()) + .totalPages(results.isEmpty() ? offset.getPageNumber() : totalElements / results.size()) .build(); } );