浏览代码

fix: loading of classes for script-generated graphs

Lazy loading of refs for classes isn't supported in the UI yet so
no need to self-inflect this. Also can move schema graph from :string
to :default usage now
Gabriel Horner 1 年之前
父节点
当前提交
c5911a571b

+ 0 - 4
deps/db/src/logseq/db/sqlite/common_db.cljs

@@ -74,10 +74,6 @@
     :else
     block))
 
-(defn- with-tags
-  [db block]
-  (update block :block/tags (fn [tags] (d/pull-many db '[*] (map :db/id tags)))))
-
 (defn- mark-block-fully-loaded
   [b]
   (assoc b :block.temp/fully-loaded? true))

+ 2 - 1
scripts/src/logseq/tasks/db_graph/create_graph.cljs

@@ -226,7 +226,8 @@
                              (when-let [props (not-empty (:properties class-m))]
                                (merge
                                 (->block-properties (merge props (property-value-properties pvalue-tx-m)) uuid-maps all-idents)
-                                {:block/refs (build-property-refs props all-idents)}))
+                                ;; TODO: Re-enable when this is also done in the app as this can cause block loading problems
+                                #_{:block/refs (build-property-refs props all-idents)}))
                              (when class-parent
                                {:class/parent
                                 (or (class-db-ids class-parent)

+ 1 - 1
scripts/src/logseq/tasks/db_graph/create_graph_with_schema_org.cljs

@@ -76,7 +76,7 @@
   {"schema:Integer" :number
    "schema:Float" :number
    "schema:Number" :number
-   "schema:Text_Class" :string
+   "schema:Text_Class" :default
    "schema:URL_Class" :url
    "schema:Boolean" :checkbox
    "schema:Date" :date})