Skip to content

Commit 5311636

Browse files
committed
Temporary (read: BAD) fix to casing issue in Reactions template vars
1 parent b2f2a06 commit 5311636

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/main/lrsql/util/reaction.clj

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
[lrsql.spec.common :as cs]
66
[lrsql.spec.reaction :as rs]
77
[lrsql.spec.statement :as ss]
8+
[clojure.string :refer [lower-case]]
89
[xapi-schema.spec :as xs]))
910

1011
(s/fdef path->string
@@ -80,7 +81,10 @@
8081
(walk/postwalk #(if (and (map? %)
8182
(= (key (first %)) "$templatePath"))
8283
(let [input-path (val (first %))
83-
path (update input-path 0 keyword)
84+
path (update input-path 0 (fn [cn]
85+
(-> cn
86+
lower-case
87+
keyword)))
8488
result (get-in cond->statement path :not-found)]
8589
(case result
8690
:not-found (throw (ex-info (str "No value found at " input-path)

0 commit comments

Comments
 (0)