(cloud) fixes issues encountered in testing.
This commit is contained in:
@@ -57,3 +57,14 @@
|
||||
(or (= "admin" (:user/role identity))
|
||||
((set (map :db/id (:user/clients identity))) (:db/id client))
|
||||
((set (map :db/id (:user/clients identity))) client)))
|
||||
|
||||
|
||||
(defn ->pattern [x]
|
||||
(. java.util.regex.Pattern (compile x java.util.regex.Pattern/CASE_INSENSITIVE)))
|
||||
|
||||
|
||||
(defn dom [^java.util.Date x]
|
||||
(-> x
|
||||
(.toInstant)
|
||||
(.atZone (java.time.ZoneId/of "US/Pacific"))
|
||||
(.get java.time.temporal.ChronoField/DAY_OF_MONTH)))
|
||||
|
||||
@@ -376,7 +376,7 @@
|
||||
|
||||
(defn upsert-transaction [db transaction]
|
||||
;; because some transactions will reference temp ids, you have to dissoc them, like :transaction/payment
|
||||
(let [upserted-entity (upsert-entity db (dissoc transaction :transaction/payment))
|
||||
(let [upserted-entity (upsert-entity db (dissoc transaction :transaction/payment :import-batch/_entry))
|
||||
with-transaction (try (dc/with db {:tx-data upserted-entity})
|
||||
(catch ClassCastException e
|
||||
(println "Dev local does not support with in tx functions. :(")
|
||||
|
||||
Reference in New Issue
Block a user