mirror of
https://github.com/logseq/logseq.git
synced 2026-04-26 15:15:01 +00:00
fix: fix validate db test
This commit is contained in:
6
deps/db/script/validate_client_db.cljs
vendored
6
deps/db/script/validate_client_db.cljs
vendored
@@ -20,10 +20,8 @@
|
||||
"Validate datascript db as a vec of entity maps"
|
||||
[db ent-maps* {:keys [verbose group-errors humanize closed-maps]}]
|
||||
(let [ent-maps (db-malli-schema/update-properties-in-ents db ent-maps*)
|
||||
schema (db-validate/update-schema db-malli-schema/DB db {:closed-schema? closed-maps})]
|
||||
(if-let [explanation (->> ent-maps
|
||||
(m/explain schema)
|
||||
not-empty)]
|
||||
explainer (db-validate/get-schema-explainer closed-maps)]
|
||||
(if-let [explanation (->> ent-maps explainer not-empty)]
|
||||
(do
|
||||
(if group-errors
|
||||
(let [ent-errors (db-validate/group-errors-by-entity db ent-maps (:errors explanation))]
|
||||
|
||||
Reference in New Issue
Block a user