From 4fa8abea304d3c53fb0b3cb0e92d23859078ef89 Mon Sep 17 00:00:00 2001 From: Fabrice Lecomte Date: Sat, 3 Aug 2019 00:54:10 +0200 Subject: [PATCH] fix: pagination --- src/main/kotlin/fr/postgresjson/connexion/Paginated.kt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/fr/postgresjson/connexion/Paginated.kt b/src/main/kotlin/fr/postgresjson/connexion/Paginated.kt index 12c9dc6..cb6d21f 100644 --- a/src/main/kotlin/fr/postgresjson/connexion/Paginated.kt +++ b/src/main/kotlin/fr/postgresjson/connexion/Paginated.kt @@ -14,7 +14,7 @@ data class Paginated>( init { if (offset < 0) error("offset must be greather or equal than 0") - if (limit < 1) error("limit must be greather than 1") - if (total < 1) error("total must be greather or equal than 0") + if (limit < 1) error("limit must be greather or equal than 1") + if (total < 0) error("total must be greather or equal than 0") } } \ No newline at end of file