don't freak out over nulls.

This commit is contained in:
Bryce Covert
2019-08-01 06:38:58 -07:00
parent 6ec8a62abc
commit a6b1ac9cf0

View File

@@ -177,8 +177,8 @@
(mapv (mapv
(fn [li ] (fn [li ]
(-> li (-> li
(update :debit #(Double/parseDouble %)) (update :debit #(Double/parseDouble (if (str/blank? %) "0" %)))
(update :credit #(Double/parseDouble %)))) (update :credit #(Double/parseDouble (if (str/blank? %) "0" %)))))
lis))))] lis))))]
(let [vendor (all-vendors (:vendor_name entry))] (let [vendor (all-vendors (:vendor_name entry))]
(when-not (all-clients (:client_code entry)) (when-not (all-clients (:client_code entry))
@@ -236,3 +236,4 @@
:existing [] :existing []
:errors (map (fn [x] {:external_id (:external_id x) :errors (map (fn [x] {:external_id (:external_id x)
:error (:error x)}) errors)})) :error (:error x)}) errors)}))