Loan result

This commit is contained in:
CHIEFSOFT\ameye
2025-02-17 13:52:32 -05:00
parent e81b90b455
commit 586364c31a
+4 -2
View File
@@ -245,14 +245,16 @@ def salary_loanselect2():
# validate input # validate input
loan = data["loan"] loan = data["loan"]
bvn = data["bvn"] bvn = data["bvn"]
print ("here - 001 ")
if loan != '' and bvn != '' : if loan != '' and bvn != '' :
loan = load_offer(loan,bvn) print ("here - 002 ")
loan_result = load_offer(loan,bvn)
INSERT_LOAN ="INSERT INTO loan_select (loan, bvn) VALUES(%s, %s)" INSERT_LOAN ="INSERT INTO loan_select (loan, bvn) VALUES(%s, %s)"
new_data = (loan,bvn) new_data = (loan,bvn)
with connection: with connection:
with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor: with connection.cursor(cursor_factory=psycopg2.extras.DictCursor) as cursor:
cursor.execute(INSERT_LOAN, new_data) cursor.execute(INSERT_LOAN, new_data)
print ("here - 003 ")
return { return {
"message": "REQUEST_AMOUNT", "message": "REQUEST_AMOUNT",
"loan": loan, "loan": loan,