mirror of
https://github.com/logseq/logseq.git
synced 2026-05-28 22:49:53 +00:00
cleanup old uses of :id property
they should only run on file graphs
This commit is contained in:
@@ -315,7 +315,8 @@
|
||||
repo (or repo (state/get-current-repo))
|
||||
format (or format (state/get-preferred-format))
|
||||
page (db/entity repo (:db/id page))
|
||||
block-id (when (map? properties) (get properties :id))
|
||||
block-id (when (and (not (config/db-based-graph? repo)) (map? properties))
|
||||
(get properties :id))
|
||||
content (-> (file-property/remove-built-in-properties-when-file-based repo format content)
|
||||
(drawer/remove-logbook))]
|
||||
(cond
|
||||
|
||||
@@ -137,15 +137,12 @@
|
||||
[txs opts before-editor-cursor]
|
||||
(let [repo (state/get-current-repo)
|
||||
db-based? (config/db-based-graph? repo)
|
||||
txs (map (fn [m] (if (map? m)
|
||||
(cond-> m
|
||||
true
|
||||
(dissoc :block/children :block/meta :block/top? :block/bottom? :block/anchor
|
||||
:block/title :block/body :block/level :block/container :db/other-tx
|
||||
:block/unordered)
|
||||
db-based?
|
||||
(update :block/properties dissoc :id))
|
||||
m)) txs)
|
||||
txs (map (fn [m]
|
||||
(if (map? m)
|
||||
(dissoc m :block/children :block/meta :block/top? :block/bottom? :block/anchor
|
||||
:block/title :block/body :block/level :block/container :db/other-tx
|
||||
:block/unordered)
|
||||
m)) txs)
|
||||
txs (remove-nil-from-transaction txs)
|
||||
txs (cond-> txs
|
||||
(:uuid-changed opts)
|
||||
|
||||
Reference in New Issue
Block a user