Closed jonathanjansen closed 2 years ago
@jonathanjansen, that sounds like a bug for sure. There's probably somewhere in apply-type-fns
where it's checking whether the value is truthy before applying the function, rather than checking whether it's non-nil
. Should be a one-liner once it's tracked down. PRs welcome!
@camsaul
Thank you for the reply
Its the when-let src/toucan/models.clj line 303
(defn- apply-type-fns
"Apply the appropriate `type-fns` for OBJ."
[obj direction]
(into obj (for [[col type] (types obj)]
(when-let [v (get obj col)]
{col ((get-in @type-fns [type direction]) v)}))))
I will do a pull request over the week.
Fixed by #90
Hi @camsaul
I am attempting to run a type function, when the column value is false the function does not run, as per below.