File tree Expand file tree Collapse file tree 1 file changed +21
-11
lines changed
deps/outliner/src/logseq/outliner Expand file tree Collapse file tree 1 file changed +21
-11
lines changed Original file line number Diff line number Diff line change 306306
307307(defn- get-property-value-eid
308308 [db property-id raw-value]
309- (first
310- (d/q '[:find [?v ...]
311- :in $ ?property-id ?raw-value
312- :where
313- [?b ?property-id ?v]
314- (or [?v :block/title ?raw-value]
315- [?v :logseq.property/value ?raw-value])]
316- db
317- property-id
318- raw-value)))
309+ (if (= property-id :block/tags )
310+ (first
311+ (d/q '[:find [?v ...]
312+ :in $ ?title
313+ :where
314+ [?v :block/title ?title]
315+ [?v :block/tags :logseq.class/Tag ]]
316+ db
317+ raw-value))
318+ (first
319+ (d/q '[:find [?v ...]
320+ :in $ ?property-id ?raw-value
321+ :where
322+ [?b ?property-id ?v]
323+ (or [?v :block/title ?raw-value]
324+ [?v :logseq.property/value ?raw-value])]
325+ db
326+ property-id
327+ raw-value))))
319328
320329(defn- find-or-create-property-value
321330 " Find or create a property value. Only to be used with properties that have ref types"
491500 [:db/retract (:db/id block) :block/tags :logseq.class/Task ]]
492501 {:outliner-op :save-block })
493502
494- (= (:logseq.property/default-value property ) (get block property-id))
503+ (and (:logseq.property/default-value property )
504+ (= (:logseq.property/default-value property ) (get block property-id)))
495505 (ldb/transact! conn
496506 [{:db/id (:db/id block)
497507 property-id :logseq.property/empty-placeholder }]
You can’t perform that action at this time.
0 commit comments