Paginate returning differents values for similar results

My paginate is returning differents values for similar results, this is throwing errors in my kendo-grid pagination.

If i have no records, the lastPage is returning 0, there’s a way to forces adonis to return 1? Because when i have lastPage=0 my pagination component thinks that have more pages, shownig the next page button enabled.
If i have one record, the lastPage is returning 1 (only have one page), here i have no problems, everything works well.

1 Like