ref
This commit is contained in:
@@ -144,6 +144,15 @@ class Loan(db.Model):
|
||||
|
||||
@classmethod
|
||||
def get_latest_loan_without_disburse_date(cls):
|
||||
"""
|
||||
Get the latest loan without a disbursement date.
|
||||
"""
|
||||
return cls.query.filter(
|
||||
cls.disburse_date.is_(None)
|
||||
).order_by(cls.created_at.desc()).first()
|
||||
|
||||
@classmethod
|
||||
def get_latest_loan_with_disburse_date(cls):
|
||||
"""
|
||||
Get the latest loan without a disbursement date.
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user