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")
|
||||
if recent_only:
|
||||
query = query.order_by(cls.created_at.desc()).limit(10)
|
||||
# Get total count before pagination
|
||||
total_count = query.count()
|
||||
else:
|
||||
# Apply filters if provided
|
||||
if id:
|
||||
|
||||
Reference in New Issue
Block a user