diff --git a/src/clj/auto_ap/graphql.clj b/src/clj/auto_ap/graphql.clj index 94d1a09b..9260e53a 100644 --- a/src/clj/auto_ap/graphql.clj +++ b/src/clj/auto_ap/graphql.clj @@ -40,9 +40,8 @@ :serialize #(or (:ident %) (:db/ident %) %)} :iso_date {:parse #(time/parse % time/iso-date) :serialize #(time/unparse % time/iso-date)} - :money {:parse #(do - (cond (and (string? %) - (not (str/blank? %))) + :money {:parse #(cond (and (string? %) + (not (str/blank? %))) (Double/parseDouble %) (and (string? %) @@ -52,8 +51,8 @@ (int? %) (double %) - :else - %) + :else + %) :serialize #(cond (double? %) (str %) @@ -63,17 +62,15 @@ :else %) } - :percentage {:parse #(do - (log/info "value is" %) - (cond (and (string? %) - (not (str/blank? %))) - (Double/parseDouble %) + :percentage {:parse #(cond (and (string? %) + (not (str/blank? %))) + (Double/parseDouble %) - (int? %) - (double %) + (int? %) + (double %) - :else - %)) + :else + %) :serialize #(if (double? %) (str %) %)}}