fix: fix validate db test

This commit is contained in:
rcmerci
2024-12-02 13:50:43 +08:00
parent fbe8d2329c
commit d2c877b484
2 changed files with 6 additions and 7 deletions

View File

@@ -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))]