Show error if STATUS isn't one of the accepted values
This commit is contained in:
parent
cf761c40a5
commit
087165a993
1 changed files with 6 additions and 0 deletions
|
@ -65,6 +65,12 @@ with a ‘/’.")
|
|||
(list "COMMENTS-CLOSED-DATE"
|
||||
(and (not (string-empty-p date))
|
||||
(tekuti--format-date date))))
|
||||
(`("STATUS" ,status)
|
||||
(let ((accepted-values '("publish" "draft" "private")))
|
||||
(if (member status accepted-values)
|
||||
pair
|
||||
(error "Unknown post status: %s; Accepted values are: %s"
|
||||
status accepted-values))))
|
||||
(_ pair)))
|
||||
|
||||
(defun tekuti-build-data-from-org ()
|
||||
|
|
Loading…
Reference in a new issue