summaryrefslogtreecommitdiff
path: root/gnosis-dev.el
diff options
context:
space:
mode:
authorThanos Apollo <[email protected]>2024-01-03 09:07:06 +0200
committerThanos Apollo <[email protected]>2024-01-03 09:07:06 +0200
commitc579e1aad0cb56eaf2bacbbe536abb728ebad8c0 (patch)
treeedc66a1fdff32f58793fed92c2ff3acbb8ade50d /gnosis-dev.el
parentdb1ca87f10a402c28b1abd1c3db8ceaaaf45666f (diff)
gnosis-dev: Check if testing-deck exists
Diffstat (limited to 'gnosis-dev.el')
-rw-r--r--gnosis-dev.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/gnosis-dev.el b/gnosis-dev.el
index 38dac88..1a0b398 100644
--- a/gnosis-dev.el
+++ b/gnosis-dev.el
@@ -25,7 +25,8 @@
"Add random inputs to test."
(let ((num (or num (string-to-number (read-string "Number of random inputs: "))))
(testing-deck (or deck "testing")))
- (gnosis-add-deck testing-deck)
+ (unless (gnosis-get 'name 'decks `(= name ,testing-deck))
+ (gnosis-add-deck testing-deck))
(when (y-or-n-p "Add MCQ type?")
(dotimes (_ num)
(gnosis-add-note--mcq :deck testing-deck