only inserting transactions if company found

This commit is contained in:
BC
2018-08-02 22:01:02 -07:00
parent 0878ccbf20
commit 208c294bec

View File

@@ -68,6 +68,7 @@
(try (try
(when company-id
(transactions/upsert! (transactions/upsert!
{:post-date (time/parse post-date "YYYY-MM-dd") {:post-date (time/parse post-date "YYYY-MM-dd")
:id (sha-256 (str id)) :id (sha-256 (str id))
@@ -84,7 +85,7 @@
:check-id check-id :check-id check-id
}) })
(when check-id (when check-id
(checks/update! {:id check-id :status "cleared"})) (checks/update! {:id check-id :status "cleared"})))
(catch Exception e (catch Exception e
(println e))))) (println e)))))