From 9175fe012db09e2ca7c9cb7763de4830002a45bb Mon Sep 17 00:00:00 2001 From: rcmerci Date: Mon, 26 Jun 2023 18:01:48 +0800 Subject: [PATCH] fix: load property entities --- src/main/frontend/db/restore.cljs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/frontend/db/restore.cljs b/src/main/frontend/db/restore.cljs index a3b1ca9b9f..d29ab4541b 100644 --- a/src/main/frontend/db/restore.cljs +++ b/src/main/frontend/db/restore.cljs @@ -149,7 +149,8 @@ init-data' (doall (keep (fn [b] (let [eid (assign-id-to-uuid-fn (:uuid b))] - (if (and (uuid-string? (:uuid b)) (not= (:type b) 3)) ; deleted blocks still refed + (if (and (uuid-string? (:uuid b)) + (not (contains? #{3 6} (:type b)))) ; deleted blocks still refed [[eid :block/uuid (:uuid b)]] (->> b :datoms @@ -164,14 +165,14 @@ :datoms (transit/read t-reader) (mapv (partial apply vector eid))))) - journal-blocks) + journal-blocks) pages-eav-coll (apply concat pages) blocks-eav-colls (->> (concat all-blocks' journal-blocks' init-data') (apply concat)) all-eav-coll (doall (concat pages-eav-coll blocks-eav-colls)) datoms (map - (partial eav->datom uuid->db-id-map) - all-eav-coll) + (partial eav->datom uuid->db-id-map) + all-eav-coll) db-name (db-conn/datascript-db repo) db-conn (util/profile :restore-graph-from-sqlite!-init-db (d/conn-from-datoms datoms db-schema/schema-for-db-based-graph))