summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-03-03 09:00:41 +0200
committerThanos Apollo <[email protected]>2024-03-03 09:00:41 +0200
commitcdcfe9064058b45ffcbc395c6f72a894162f8c2a (patch)
tree23810880013619fe6e6cc3f5f6b5b06a42c67b08
parentdd708efdd7a797950d9f6668342894325ba1c559 (diff)
gnosis-edit-update-note: Update assertions
- Add asserts for extras to allow nil value
-rw-r--r--gnosis.el9
1 files changed, 6 insertions, 3 deletions
diff --git a/gnosis.el b/gnosis.el
index 432a05b..e82e2d0 100644
--- a/gnosis.el
+++ b/gnosis.el
@@ -1325,9 +1325,12 @@ EXTRA-NOTES: Notes to display after user-input
IMAGE: Image to display before user-input
SECOND-IMAGE: Image to display after user-input"
(cl-assert (stringp main) nil "Main must be a string")
- (cl-assert (stringp image) nil "Image must be a string, path to image file from `gnosis-images-dir'")
- (cl-assert (stringp second-image) nil "Second-image must be a string, path to image file from `gnosis-images-dir'")
- (cl-assert (stringp extra-notes) nil "Extra-notes must be a string")
+ (cl-assert (or (stringp image) (null image)) nil
+ "Image must be a string, path to image file from `gnosis-images-dir', or nil")
+ (cl-assert (or (stringp second-image) (null second-image)) nil
+ "Second-image must be a string, path to image file from `gnosis-images-dir', or nil")
+ (cl-assert (or (stringp extra-notes) (null extra-notes)) nil
+ "Extra-notes must be a string, or nil")
(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")
;; Construct the update clause for the emacsql update statement.