mirror of https://github.com/logseq/logseq
fix(rtc): db/retract when :type/link/schema/properties is nil
parent
3ab33ff831
commit
b892c9abe9
|
@ -314,6 +314,14 @@
|
|||
(swap! *other-tx-data conj [:db/retract db-id :block/alias]))
|
||||
(when (contains? key-set :tags)
|
||||
(swap! *other-tx-data conj [:db/retract db-id :block/tags]))
|
||||
(when (contains? key-set :type)
|
||||
(swap! *other-tx-data conj [:db/retract db-id :block/type]))
|
||||
(when (and (contains? key-set :link) (nil? (:link op-value)))
|
||||
(swap! *other-tx-data conj [:db/retract db-id :block/link]))
|
||||
(when (and (contains? key-set :schema) (nil? (:schema op-value)))
|
||||
(swap! *other-tx-data conj [:db/retract db-id :block/schema]))
|
||||
(when (and (contains? key-set :properties) (nil? (:properties op-value)))
|
||||
(swap! *other-tx-data conj [:db/retract db-id :block/properties]))
|
||||
(when (seq @*other-tx-data)
|
||||
(ldb/transact! conn @*other-tx-data {:persist-op? false}))
|
||||
(transact-db! :save-block repo conn date-formatter new-block)))))))
|
||||
|
|
Loading…
Reference in New Issue