Should prevent accidentally deleting signature
This commit is contained in:
@@ -78,11 +78,10 @@
|
||||
client-code (if (str/blank? (:client/code client))
|
||||
(:code edit_client)
|
||||
(:client/code client))
|
||||
updated-entity {:db/id id
|
||||
updated-entity (cond-> {:db/id id
|
||||
:client/code client-code
|
||||
:client/name (:name edit_client)
|
||||
:client/matches (:matches edit_client)
|
||||
:client/signature-file signature-file
|
||||
:client/email (:email edit_client)
|
||||
:client/locked-until (some-> (:locked_until edit_client) (coerce/to-date))
|
||||
:client/locations (filter identity (:locations edit_client))
|
||||
@@ -113,7 +112,7 @@
|
||||
:client/week-b-credits (:week_b_credits edit_client)
|
||||
:client/location-matches (->> (:location_matches edit_client)
|
||||
(filter (fn [lm] (and (:location lm) (:match lm))))
|
||||
(map (fn [lm] {:db/id (or (:id lm ) (random-tempid))
|
||||
(map (fn [lm] {:db/id (or (:id lm) (random-tempid))
|
||||
:location-match/location (:location lm)
|
||||
:location-match/matches [(:match lm)]})))
|
||||
:client/address (when (seq (filter identity (vals (:address edit_client))))
|
||||
@@ -147,9 +146,9 @@
|
||||
[:yodlee-account/id (:yodlee_account ba)])
|
||||
:bank-account/plaid-account (:plaid_account ba)
|
||||
:bank-account/intuit-bank-account (:intuit_bank_account ba)})
|
||||
(:bank_accounts edit_client))
|
||||
(:bank_accounts edit_client))}
|
||||
signature-file (assoc :client/signature-file signature-file))
|
||||
|
||||
}
|
||||
_ (mu/log ::upserting :up updated-entity)
|
||||
_ (assert-no-shared-transaction-sources client-code [[:upsert-entity updated-entity]])
|
||||
_ (log/info "upserting client" updated-entity)
|
||||
|
||||
Reference in New Issue
Block a user