Safety commit
Ran out of electricity last night when I'd almost but not quite got creation working properly. Frustrating! I don't have much electricity this morning so I'm pushing this up to GitHub for safety.
This commit is contained in:
parent
ba1be5dc2e
commit
7280c6f41b
2 changed files with 27 additions and 2 deletions
|
|
@ -1,6 +1,6 @@
|
|||
(ns adl-support.forms-support
|
||||
(:require [adl-support.core :refer [do-or-log-error do-or-return-reason]]
|
||||
[adl-support.utils :refer [safe-name singularise]]
|
||||
[adl-support.utils :refer [descendants-with-tag safe-name singularise]]
|
||||
[clojure.core.memoize :as memo]
|
||||
[clojure.data.json :as json]
|
||||
[clojure.java.io :as io]
|
||||
|
|
@ -103,3 +103,10 @@
|
|||
(reduce {} (map #(hash-map (keyword %) nil) ~fields))
|
||||
~params))
|
||||
|
||||
(defn property-defaults
|
||||
[entity]
|
||||
(reduce
|
||||
merge {}
|
||||
(map
|
||||
#(hash-map (keyword (-> % :attrs :name)) (-> % :attrs :default))
|
||||
(descendants-with-tag entity :property #(-> % :attrs :default)))))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue