branch: elpa/gnosis commit c2aa8964f06fdb9b40d6d48274adf5dd0ba86393 Author: Thanos Apollo <pub...@thanosapollo.org> Commit: Thanos Apollo <pub...@thanosapollo.org>
[fix] upgrade-v4: use old-answer instead of hypothesis for MCQ * Fix typo where we were using hypothesis instead of old-answer --- gnosis.el | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnosis.el b/gnosis.el index c8a37a7ebc..7c464f9c85 100644 --- a/gnosis.el +++ b/gnosis.el @@ -2401,8 +2401,9 @@ Return note ids for notes that match QUERY." (let* ((data (gnosis-select '[hypothesis answer] 'notes `(= id ,id) t)) (hypothesis (nth 0 data)) (old-answer (car (nth 1 data))) - (new-answer (when (integerp hypothesis) (list (nth (- 1 old-answer) hypothesis))))) - (when (integerp hypothesis) + (new-answer (when (integerp old-answer) + (list (nth (- 1 old-answer) hypothesis))))) + (when (integerp old-answer) (gnosis-update 'notes `(= answer ',new-answer) `(= id ,id))))) note)) ;; Replace y-or-n with MCQ