Browse Source

fix: names

Tienson Qin 1 year ago
parent
commit
71765f88e2

+ 2 - 2
deps/graph-parser/src/logseq/graph_parser/exporter.cljs

@@ -76,7 +76,7 @@
         [:block/uuid existing-tag-uuid]
         ;; Creates or updates page within same tx
         (-> (merge tag-block
-                   (find-or-create-class db (:block/original-name tag-block) all-idents))
+                   (find-or-create-class db (:block/title tag-block) all-idents))
             ;; override with imported timestamps
             (dissoc :block/created-at :block/updated-at)
             (merge (add-missing-timestamps
@@ -555,7 +555,7 @@
                                                     distinct)]
             (cond-> block
               (seq parent-classes-from-properties)
-              (merge (find-or-create-class db (:block/original-name block) (:all-idents import-state)))
+              (merge (find-or-create-class db (:block/title block) (:all-idents import-state)))
               (seq parent-classes-from-properties)
               (assoc :class/parent
                      (let [new-class (first parent-classes-from-properties)]

+ 2 - 2
deps/graph-parser/test/logseq/graph_parser/exporter_test.cljs

@@ -472,7 +472,7 @@
                 set))
         "All classes are correctly defined by :type")
 
-    (is (= "CreativeWork" (get-in (d/entity @conn :user.class/Movie) [:class/parent :block/original-name]))
+    (is (= "CreativeWork" (get-in (d/entity @conn :user.class/Movie) [:class/parent :block/title]))
         "Existing page correctly set as class parent")
-    (is (= "Thing" (get-in (d/entity @conn :user.class/CreativeWork) [:class/parent :block/original-name]))
+    (is (= "Thing" (get-in (d/entity @conn :user.class/CreativeWork) [:class/parent :block/title]))
         "New page correctly set as class parent")))