Skip to content

Commit

Permalink
fix(regression): publishing using removed rules
Browse files Browse the repository at this point in the history
  • Loading branch information
logseq-cldwalker committed Nov 8, 2024
1 parent 5f83182 commit eeb9d53
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions deps/publishing/src/logseq/publishing/db.cljs
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
(let [pages (->> (d/q
'[:find ?p
:in $ %
:where (page-property ?p :logseq.property/public true)]
:where (property ?p :logseq.property/public true) [?p :block/name]]
db
(rules/extract-rules rules/db-query-dsl-rules [:page-property]))
(rules/extract-rules rules/db-query-dsl-rules [:property]))
(map first)
set)
page-ents (map #(d/entity db %) pages)
Expand All @@ -72,9 +72,9 @@
(->> (d/q
'[:find ?p
:in $ %
:where (page-property ?p :logseq.property/public false)]
:where (property ?p :logseq.property/public false) [?p :block/name]]
db
(rules/extract-rules rules/db-query-dsl-rules [:page-property]))
(rules/extract-rules rules/db-query-dsl-rules [:property]))
(map first)
set))

Expand Down Expand Up @@ -184,7 +184,7 @@
(not (contains? non-public-datom-ids (:e datom)))))))
datoms (d/datoms filtered-db :eavt)
assets (if db-graph? (get-db-assets filtered-db) (get-file-assets db datoms))]
;; (prn :datoms (count datoms) :assets (count assets))
;; (prn :public-counts :datoms (count datoms) :assets (count assets))
[@(d/conn-from-datoms datoms (:schema db)) assets]))

(defn- file-filter-only-public
Expand Down Expand Up @@ -229,5 +229,5 @@
filtered-db (d/filter db filter-fn)
datoms (d/datoms filtered-db :eavt)
assets (if db-graph? (get-db-assets filtered-db) (get-file-assets db datoms))]
;; (prn :counts :internal (count internal-ents) :datoms (count datoms) :assets (count assets))
;; (prn :private-counts :internal (count internal-ents) :datoms (count datoms) :assets (count assets))
[@(d/conn-from-datoms datoms (:schema db)) assets]))

0 comments on commit eeb9d53

Please sign in to comment.