06/01 Fix mapped accounts last sync time
This commit is contained in:
@@ -308,9 +308,11 @@ def import_transactions(parsed_txns, teller_account):
|
|||||||
|
|
||||||
db.session.commit()
|
db.session.commit()
|
||||||
|
|
||||||
# Update sync metadata
|
# Update sync metadata on both the account and its parent enrollment
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
|
now = datetime.utcnow()
|
||||||
teller_account.last_sync_date = date.today()
|
teller_account.last_sync_date = date.today()
|
||||||
|
teller_account.enrollment.last_synced_at = now
|
||||||
if parsed_txns:
|
if parsed_txns:
|
||||||
teller_account.last_teller_txn_id = parsed_txns[0]['teller_id']
|
teller_account.last_teller_txn_id = parsed_txns[0]['teller_id']
|
||||||
from app.extensions import db as _db
|
from app.extensions import db as _db
|
||||||
|
|||||||
Reference in New Issue
Block a user