Skip to content

Commit

Permalink
OK-816 Return empty :content, but include flattened content under :fl…
Browse files Browse the repository at this point in the history
…at-content
  • Loading branch information
msiukola committed Jan 31, 2025
1 parent c283715 commit d1b03d4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/clj/ataru/forms/form_store.clj
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@
form))

(defn assoc-flattened-content [form]
(assoc form :flat-content (util/flatten-form-fields (:content form))))

(-> form
(assoc :flat-content (util/flatten-form-fields (:content form)))
(assoc :content {})))

(defn- postprocess [result]
(->> (if (or (seq? result) (list? result) (vector? result)) result [result])
Expand Down Expand Up @@ -107,8 +108,7 @@
(defn fetch-forms-by-ids [ids]
(log/info "Fetching forms for" (count ids) "ids.")
(->> (execute yesql-get-forms-by-ids {:ids ids} nil)
;(map assoc-flattened-content)
))
(map assoc-flattened-content)))

(def fetch-form fetch-latest-version)

Expand Down

0 comments on commit d1b03d4

Please sign in to comment.