Skip to content

Commit

Permalink
fix: Task descendant object added Task tag
Browse files Browse the repository at this point in the history
when Status added. Fixes
https://test.logseq.com/#/page/675326b3-7e92-4cf0-b9d3-cc367049b920.
Also fixes class-instance? not working for parent classes
  • Loading branch information
logseq-cldwalker committed Dec 6, 2024
1 parent 7092444 commit b89a492
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions deps/db/src/logseq/db.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -576,8 +576,8 @@
tags-ids (set (map :db/id tags))]
(or
(contains? tags-ids (:db/id class))
(let [class-parents (get-classes-parents tags)]
(contains? (set/union class-parents tags-ids) (:db/id class))))))
(let [class-parent-ids (set (map :db/id (get-classes-parents tags)))]
(contains? (set/union class-parent-ids tags-ids) (:db/id class))))))

(defn get-all-pages-views
[db]
Expand Down
10 changes: 5 additions & 5 deletions deps/outliner/src/logseq/outliner/property.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -37,15 +37,15 @@
retract-multiple-values? (and multiple-values? (sequential? value))
multiple-values-empty? (and (sequential? old-value)
(contains? (set (map :db/ident old-value)) :logseq.property/empty-placeholder))
block (assoc (outliner-core/block-with-updated-at {:db/id (:db/id block)})
block' (assoc (outliner-core/block-with-updated-at {:db/id (:db/id block)})
property-id value)
block-tx-data (cond-> block
status?
block-tx-data (cond-> block'
(and status? (not (ldb/class-instance? (d/entity @conn :logseq.class/Task) block)))
(assoc :block/tags :logseq.class/Task))]
[(when multiple-values-empty?
[:db/retract (:db/id block) property-id :logseq.property/empty-placeholder])
[:db/retract (:db/id block') property-id :logseq.property/empty-placeholder])
(when retract-multiple-values?
[:db/retract (:db/id block) property-id])
[:db/retract (:db/id block') property-id])
block-tx-data]))))

(defn- get-property-value-schema
Expand Down

0 comments on commit b89a492

Please sign in to comment.