Browse Source

fix: db import shouldn't fail on asset imports

Correctly display asset related properties as ignored for now.
Related to #11563. Also fix lint
Gabriel Horner 1 year ago
parent
commit
594e255d98

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

@@ -387,7 +387,7 @@
   (let [m
         (->> props
              (mapcat (fn [[prop prop-value]]
-                       (if (#{:icon} prop)
+                       (if (#{:icon :file :file-path :hl-stamp} prop)
                          (do (swap! ignored-properties
                                     conj
                                     {:property prop :value prop-value :location (if name {:page name} {:block title})})
@@ -409,6 +409,8 @@
                            nil
                            :filters
                            (translate-linked-ref-filters prop-value page-names-to-uuids)
+                           :ls-type
+                           [[:logseq.property/ls-type (keyword prop-value)]]
                            ;; else
                            [[(built-in-property-name-to-idents prop) prop-value]]))))
              (into {}))]

+ 0 - 1
src/main/frontend/components/container.cljs

@@ -8,7 +8,6 @@
             [frontend.components.plugins :as plugins]
             [frontend.components.repo :as repo]
             [frontend.components.right-sidebar :as right-sidebar]
-            [frontend.components.select :as select]
             [frontend.components.theme :as theme]
             [frontend.components.dnd :as dnd-component]
             [frontend.components.icon :as icon]