added counts
This commit is contained in:
@@ -81,6 +81,8 @@ class Loan(db.Model):
|
|||||||
logger.info(f"Get all loan models from loans model cme back")
|
logger.info(f"Get all loan models from loans model cme back")
|
||||||
if recent_only:
|
if recent_only:
|
||||||
query = query.order_by(cls.created_at.desc()).limit(10)
|
query = query.order_by(cls.created_at.desc()).limit(10)
|
||||||
|
# Get total count before pagination
|
||||||
|
total_count = query.count()
|
||||||
else:
|
else:
|
||||||
# Apply filters if provided
|
# Apply filters if provided
|
||||||
if id:
|
if id:
|
||||||
|
|||||||
Reference in New Issue
Block a user