From bf41f07abb0ff942e8acbd6451aa0cd9ddfcefbe Mon Sep 17 00:00:00 2001 From: David Botton Date: Mon, 16 May 2022 19:37:49 -0400 Subject: [PATCH] bug in save content --- source/clog-web-dbi.lisp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/source/clog-web-dbi.lisp b/source/clog-web-dbi.lisp index d2cd3ab..9d03cf1 100644 --- a/source/clog-web-dbi.lisp +++ b/source/clog-web-dbi.lisp @@ -338,16 +338,17 @@ and if CAN-EDIT unless they are set to nil." (funcall theme obj :content-body (list :content content :save-edit (when (clog-auth:is-authorized-p roles can-edit) - (lambda (content) + (lambda (new-content) (when on-edit - (setf content (funcall on-edit content))) - (when content + (setf new-content (funcall on-edit new-content))) + (when new-content (dbi:do-sql sql-connection (sql-update table - content + new-content "key=? and createdate=?") - (list page (getf content :|createdate|)))))) + (list page (getf content :|createdate|))) + (print (getf content :|createdate|))))) :do-delete (when (clog-auth:is-authorized-p roles can-edit) (lambda () (if on-delete