mirror of
https://github.com/logseq/logseq.git
synced 2026-02-01 22:47:36 +00:00
fix: refs not built for imported EDN
from UI form or when using cli in-app graph
This commit is contained in:
@@ -126,8 +126,7 @@
|
||||
;; (cljs.pprint/pprint _txs)
|
||||
(when error
|
||||
(throw (ex-info (str "Error while building import data: " error) {})))
|
||||
(let [tx-meta {::sqlite-export/imported-data? true
|
||||
:import-db? true}]
|
||||
(let [tx-meta {::sqlite-export/imported-data? true}]
|
||||
(ldb/transact! conn (vec (concat init-tx block-props-tx misc-tx)) tx-meta))))
|
||||
|
||||
(defn- get-ident [idents title]
|
||||
|
||||
@@ -518,8 +518,13 @@
|
||||
(or from-disk? new-graph?)
|
||||
{:tx-report tx-report}
|
||||
|
||||
;; Rebuild refs for a new DB graph using EDN or when EDN data is imported.
|
||||
;; Ref rebuilding happens here because transact-pipeline doesn't rebuild refs
|
||||
;; for these cases
|
||||
(or (::gp-exporter/new-graph? tx-meta)
|
||||
(and (::sqlite-export/imported-data? tx-meta) (:import-db? tx-meta)))
|
||||
(and (::sqlite-export/imported-data? tx-meta)
|
||||
;; Undo and redo must be handled by default in order to work
|
||||
(not (:undo? tx-meta)) (not (:redo? tx-meta))))
|
||||
(invoke-hooks-for-imported-graph conn tx-report)
|
||||
|
||||
:else
|
||||
|
||||
Reference in New Issue
Block a user