fix: Add condition for total greater than zero (#7)

This commit is contained in:
vikynoah
2024-10-28 15:37:14 +01:00
committed by GitHub
parent 5a32a5908b
commit c5b2ab9932

View File

@@ -107,7 +107,7 @@ def paginate(
count_query = create_count_query(query)
total = connection.scalar(count_query)
if paginationFlag is False:
if paginationFlag is False and total > 0:
params = Params(page=1, size=total)
query = create_paginate_query(query, params)