Browse Source

fix: restore to empty string after deleting the last block value

Tienson Qin 1 year ago
parent
commit
caa0763cee
2 changed files with 2 additions and 1 deletions
  1. 1 0
      src/main/frontend/db_worker.cljs
  2. 1 1
      src/main/frontend/worker/pipeline.cljs

+ 1 - 0
src/main/frontend/db_worker.cljs

@@ -392,6 +392,7 @@
                         (ldb/get-page @conn (:today-journal-name tx-meta))) ; today journal created already
 
            ;; (prn :debug :transact :tx-data tx-data' :tx-meta tx-meta')
+
            (worker-util/profile "Worker db transact"
                                 (ldb/transact! conn tx-data' tx-meta')))
          nil)

+ 1 - 1
src/main/frontend/worker/pipeline.cljs

@@ -42,7 +42,7 @@
                        created-block (d/entity after-db (:db/id created-from-block))]
                    (when (and created-block created-from-property)
                      [[:db/retractEntity (:db/id b)]
-                      [:db/add (:db/id created-block) (:db/id created-from-property) ""]])))
+                      [:db/add (:db/id created-block) (:db/ident created-from-property) ""]])))
                empty-property-parents)
        (remove nil?)))))