summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-03-08 12:56:51 +0200
committerThanos Apollo <[email protected]>2024-03-08 12:56:51 +0200
commit39c13d240bd6f22161df07a7bda7f1ef2d56832a (patch)
treee5f6c7e7a0d0ff3bc45a324b55520fdaa64529e9
parent3b705cfb4a675e882d48fd98965ceb0803e74df9 (diff)
[fix] gnosis-edit-update-note: Add assert for suspend
Make sure that suspend value is either 0 or 1
-rw-r--r--gnosis.el1
1 files changed, 1 insertions, 0 deletions
diff --git a/gnosis.el b/gnosis.el
index 2fd0140..f338de9 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1403,6 +1403,7 @@ SUSPEND: Suspend note, 0 for unsuspend, 1 for suspend"
(cl-assert (listp tags) nil "Tags must be a list of strings")
(cl-assert (and (listp ef) (length= ef 3)) nil "ef must be a list of 3 floats")
(cl-assert (or (stringp options) (listp options)) nil "Options must be a string, or a list for MCQ")
+ (cl-assert (or (= suspend 0) (= suspend 1)) nil "Suspend must be either 0 or 1")
;; Construct the update clause for the emacsql update statement.
(cl-loop for (field . value) in
`((main . ,main)