From c579e1aad0cb56eaf2bacbbe536abb728ebad8c0 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 3 Jan 2024 09:07:06 +0200 Subject: gnosis-dev: Check if testing-deck exists --- gnosis-dev.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- cgit v1.2.3