diff --git a/src/clj/auto_ap/import/yodlee2.clj b/src/clj/auto_ap/import/yodlee2.clj index 7f51f895..0bf9df65 100644 --- a/src/clj/auto_ap/import/yodlee2.clj +++ b/src/clj/auto_ap/import/yodlee2.clj @@ -51,7 +51,7 @@ (alog/info ::starting-yodlee-import) (let [import-batch (t/start-import-batch :import-source/yodlee2 "Automated yodlee2 user")] (try - (let [account-lookup (dc/q '[:find ?ya ?ba ?cd ?ud + (let [account-lookup (dc/q '[:find ?ya ?ba ?cd ?ud ?y :in $ :where [?ba :bank-account/yodlee-account ?y] @@ -72,10 +72,10 @@ (alog/info ::finished-import) (t/finish! import-batch) - (doseq [[yodlee-account bank-account] account-lookup] + (doseq [[_ bank-account _ _ ya] account-lookup] (try @(dc/transact auto-ap.datomic/conn - [{:db/id yodlee-account + [{:db/id ya :yodlee-account/pending-balance (t/get-pending-balance import-batch bank-account)}]) (catch Exception e (alog/error ::cant-persist-yodlee-account-pending-balance @@ -96,5 +96,4 @@ (Thread/sleep 10000))))) - (def import-yodlee2 (allow-once import-yodlee2-int))