fixing two bugs.

This commit is contained in:
2022-06-26 10:59:40 -07:00
parent f710f97a8c
commit 258a7ac021

View File

@@ -178,7 +178,8 @@
(remove-nils
#:charge
{:type-name (:type t)
:external-id (str "square/charge/" (:id t))
:external-id (when (:payment_id t)
(str "square/charge/" (:payment_id t)))
:processor (condp = (some-> (:note t) str/lower-case)
"doordash" :ccp-processor/doordash
"dd" :ccp-processor/doordash
@@ -486,7 +487,7 @@
(map (fn [x] [:db/retractEntity x]))))
(defn upsert-all []
(doseq [client ((get-square-clients))
(doseq [client (get-square-clients)
:when (seq (filter :square-location/client-location (:client/square-locations client)))]
(lc/with-context {:client (:client/code client)}
(upsert-locations client)