another fix.

This commit is contained in:
Bryce Covert
2019-09-30 21:47:36 -07:00
parent 6c6f49dc25
commit c7c63f6a02

View File

@@ -138,23 +138,22 @@
(when (:transaction/payment transaction) (when (:transaction/payment transaction)
(throw (ex-info "Transaction already associated with a payment" {:validation-error "Transaction already associated with a payment"}))) (throw (ex-info "Transaction already associated with a payment" {:validation-error "Transaction already associated with a payment"}))))
@(d/transact (d/connect uri)
(transduce
(map #(into
[(remove-nils (rm/apply-rule {:db/id (:db/id %)
:transaction/amount (:transaction/amount %)}
transaction-rule
(or (-> % :transaction/bank-account :bank-account/locations)
@(d/transact (d/connect uri) (-> % :transaction/client :client/locations))))]
(transduce (map (fn [x] [:db/retractEntity (:db/id x)] )
(map #(into (:transaction/accounts %))))
[(remove-nils (rm/apply-rule {:db/id (:db/id %) into
:transaction/amount (:transaction/amount %)} []
transaction-rule transactions))
)
(or (-> % :transaction/bank-account :bank-account/locations)
(-> % :transaction/client :client/locations))))]
(map (fn [x] [:db/retractEntity (:db/id x)] )
(:transaction/accounts %))))
into
[]
transactions))))
(transduce (transduce
(comp (comp
(map d-transactions/get-by-id) (map d-transactions/get-by-id)