1
0
Эх сурвалжийг харах

fix: property update causing inconsistent schema

Property :many values should be a set. Fixed one and there is still one
more to fix
Gabriel Horner 2 жил өмнө
parent
commit
73b3748bb8

+ 3 - 1
scripts/src/logseq/tasks/db_graph/validate_client_db.cljs

@@ -32,6 +32,8 @@
                      :map
                      [:vector [:or :keyword :uuid]]
                      [:set :uuid]
+                     ;; TODO: Remove when bug is fixed
+                     [:sequential :uuid]
                      [:set :string]
                      [:set :int]]]]
     [:block/created-at {:optional true} :int]
@@ -51,6 +53,7 @@
     [:block/journal-day {:optional true} :int]
     [:block/format {:optional true} [:enum :markdown]]
     [:block/tx-id {:optional true} :int]
+    [:block/marker {:optional true} :string]
     [:block/schema
      {:optional true}
      [:map
@@ -94,7 +97,6 @@
                          :entity (get full-maps (-> % :in first)))
                  errors)))
          (pprint/pprint errors))
-       
        (js/process.exit 1))
      (println "Valid!"))))
 

+ 1 - 1
src/main/frontend/handler/db_based/property.cljs

@@ -130,7 +130,7 @@
             schema (get builtin-schema-types property-type)
             properties (:block/properties block)
             values' (try
-                      (map #(convert-property-input-string property-type %) values)
+                      (set (map #(convert-property-input-string property-type %) values))
                       (catch :default e
                         (notification/show! (str e) :error false)
                         nil))