Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- from tropicalista.models.account.real_account import AccountDetails
- from tropicalista.models import DBSession
- import transaction
- borrowers = borrower.query.all()
- for b in borrowers:
- acc = AccountDetails.create_or_get_account(b,
- b.real_account_bank,
- b.real_account_bank_branch,
- b.real_account_number)
- payment_method = b.registration_current_loan.payment_method
- if payment_method.payment_method == 'payment_method_dai':
- acc.active = True
- DBSession.add(acc)
- DBSession.flush()
- transaction.commit()
Add Comment
Please, Sign In to add comment