fix: fix pagination info schema and expense router responses

This commit is contained in:
2024-11-27 17:00:49 +04:00
parent 88ce256850
commit c913336ade
3 changed files with 17 additions and 11 deletions

View File

@@ -149,7 +149,10 @@ class PayrollService(BaseService):
if not total_records:
return GetPaymentRecordsResponse(
payment_records=[],
pagination_info=PaginationInfoSchema()
pagination_info=PaginationInfoSchema(
total_pages=0,
total_items=0
)
)
total_items = total_records
total_pages = math.ceil(total_records / pagination.items_per_page)