From 5860a53abfca1bafe9deffbc2cbdd09a2ad7585a Mon Sep 17 00:00:00 2001 From: Simon Brooke Date: Thu, 9 Aug 2018 13:21:18 +0100 Subject: [PATCH] Ensure we're using the right names when checking params --- src/adl/to_selmer_routes.clj | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/adl/to_selmer_routes.clj b/src/adl/to_selmer_routes.clj index b6bff0b..7779a43 100644 --- a/src/adl/to_selmer_routes.clj +++ b/src/adl/to_selmer_routes.clj @@ -77,7 +77,7 @@ 'if (list 'all-keys-present? - 'params (key-names e true)) + 'params (set (map #(safe-name % :sql) (key-names e true)))) (list 'support/do-or-log-error (list @@ -302,6 +302,9 @@ (defn make-form-post-handler-content + "Generate the body of the post handler for the form `f` of + entity `e` in application `a`. The argument `n` is bound to the name + of the function, but is not currently used." ;; Literally the only thing the post handler has to do is to ;; generate the database store operation. Then it can hand off ;; to the get handler. @@ -317,7 +320,7 @@ 'params (set (map - #(-> % :attrs :name) + #(safe-name (-> % :attrs :name) :sql) (insertable-properties e)))) 'result (list