mirror of
https://github.com/logseq/logseq.git
synced 2026-04-30 08:56:29 +00:00
fix: imported properties aren't both a Page and Property
imported property should behave like app
This commit is contained in:
committed by
Tienson Qin
parent
ee6fd77c4a
commit
afab95f8fc
@@ -1156,7 +1156,8 @@
|
||||
property-page-properties-tx (keep (fn [b]
|
||||
(when-let [page-properties (not-empty (db-property/properties b))]
|
||||
(merge page-properties {:block/uuid (:block/uuid b)
|
||||
:block/tags (conj (:block/tags page-properties) :logseq.class/Property)})))
|
||||
:block/tags (-> (remove #(= :logseq.class/Page %) (:block/tags page-properties))
|
||||
(conj :logseq.class/Property))})))
|
||||
properties-tx)]
|
||||
{:pages-tx pages-tx'
|
||||
:property-pages-tx (concat property-pages-tx converted-property-pages-tx)
|
||||
|
||||
@@ -132,9 +132,7 @@
|
||||
[k
|
||||
(if-let [built-in-type (get-in db-property/built-in-properties [k :schema :type])]
|
||||
(if (= :block/tags k)
|
||||
(->> (mapv #(:db/ident (d/entity db (:db/id %))) v)
|
||||
(remove #{:logseq.class/Tag :logseq.class/Property})
|
||||
vec)
|
||||
(mapv #(:db/ident (d/entity db (:db/id %))) v)
|
||||
(if (db-property-type/all-ref-property-types built-in-type)
|
||||
(db-property/ref->property-value-contents db v)
|
||||
v))
|
||||
@@ -597,9 +595,9 @@
|
||||
(is (nil? (db-test/find-page-by-title @conn "type"))
|
||||
"No page exists for configured property")
|
||||
|
||||
(is (= #{:user.class/Property :logseq.class/Page}
|
||||
(is (= #{:user.class/Property :logseq.class/Property}
|
||||
(set (:block/tags (readable-properties @conn (db-test/find-page-by-title @conn "url")))))
|
||||
"tagged page has configured tag imported as a class"))))
|
||||
"tagged page has correct tags including one from option"))))
|
||||
|
||||
(deftest-async export-files-with-remove-inline-tags
|
||||
(p/let [file-graph-dir "test/resources/exporter-test-graph"
|
||||
|
||||
Reference in New Issue
Block a user