fix: repeated tx data

This commit is contained in:
Tienson Qin
2026-01-16 12:11:17 +08:00
parent 63fb758e37
commit 29f3f41ab5
2 changed files with 2 additions and 3 deletions

View File

@@ -71,4 +71,4 @@
(when (:db/id %) (vector :db.fn/retractEntity (:db/id %))))
(:block/macros b)))
retracted-blocks))]
(concat txs retracted-tx retract-history-tx macros-tx)))))
(concat retracted-tx retract-history-tx macros-tx)))))

View File

@@ -618,7 +618,6 @@
;; 1. reverse local pending txs
reversed-tx-report (when has-local-changes?
(ldb/transact! temp-conn reversed-tx-data tx-meta))
_ (prn :debug :tx-data (distinct tx-data))
;; 2. transact remote tx-data
remote-tx-report (ldb/transact! temp-conn tx-data tx-meta)
_ (reset! *remote-tx-report remote-tx-report)
@@ -708,7 +707,7 @@
txs-data (mapv (fn [data]
(parse-transit (:tx data) {:repo repo :type "pull/ok"}))
txs)
tx (mapcat identity txs-data)]
tx (distinct (mapcat identity txs-data))]
(when (seq tx)
(apply-remote-tx! repo client tx
:local-tx local-tx