🐛 Fix incorrect token sets migration (#7673)

This commit is contained in:
Andrey Antukh 2025-11-04 16:49:08 +01:00 committed by GitHub
parent 37aa59b164
commit 092a5139e3
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 8 additions and 2 deletions

View File

@ -1991,13 +1991,19 @@ Will return a value that matches this schema:
#?(:clj
(defn- migrate-to-v1-4
"Migrate the TokensLib data structure internals to v1.2 version; it
"Migrate the TokensLib data structure internals to v1.4 version; it
expects input from v1.3 version"
[params]
(let [migrate-set-node
(fn recurse [node]
(if (token-set-legacy? node)
(cond
(token-set-legacy? node)
(make-token-set node)
(token-set? node)
node
:else
(d/update-vals node recurse)))]
(update params :sets d/update-vals migrate-set-node))))