fixes rule

This commit is contained in:
Bryce Covert
2019-09-30 21:00:02 -07:00
parent 85cd5f9fb2
commit 6c6f49dc25

View File

@@ -77,12 +77,12 @@
(re-frame/reg-sub
::locations-for-client-or-bank-account
(fn [db [_ client-id bank-account-id]]
(let [client (get (:clients db) (or client (:client db)))
(let [client (get (:clients db) (or client-id (:client db)))
client-locations (:locations client)
bank-account-locations (-> (by :id (:bank-accounts client))
(get bank-account-id)
:locations)]
(or bank-account-locations client-locations))))
(or (seq bank-account-locations) client-locations))))
(re-frame/reg-sub
::clients-by-id