diff --git a/deps/outliner/src/logseq/outliner/property.cljs b/deps/outliner/src/logseq/outliner/property.cljs index fd1df9efa3..e91afba0ca 100644 --- a/deps/outliner/src/logseq/outliner/property.cljs +++ b/deps/outliner/src/logseq/outliner/property.cljs @@ -93,8 +93,9 @@ old-ref-type? (db-property-type/user-ref-property-types old-type) ref-type? (db-property-type/user-ref-property-types new-type)] (cond-> [(cond-> - {:db/ident ident - :db/cardinality cardinality} + (outliner-core/block-with-updated-at + {:db/ident ident + :db/cardinality cardinality}) ref-type? (assoc :db/valueType :db.type/ref))] (and new-type old-ref-type? (not ref-type?)) diff --git a/deps/outliner/test/logseq/outliner/property_test.cljs b/deps/outliner/test/logseq/outliner/property_test.cljs index f43a146c4f..5cfd4b88d5 100644 --- a/deps/outliner/test/logseq/outliner/property_test.cljs +++ b/deps/outliner/test/logseq/outliner/property_test.cljs @@ -16,8 +16,11 @@ (testing "Updates a property" (let [conn (db-test/create-conn-with-blocks {:properties {:num {:logseq.property/type :number}}}) - _ (outliner-property/upsert-property! conn :user.property/num {:type :default :cardinality :many} {})] - (is (db-property/many? (d/entity @conn :user.property/num))))) + old-updated-at (:block/updated-at (d/entity @conn :user.property/num)) + _ (outliner-property/upsert-property! conn :user.property/num {:cardinality :many} {})] + (is (db-property/many? (d/entity @conn :user.property/num))) + (is (> (:block/updated-at (d/entity @conn :user.property/num)) + old-updated-at)))) (testing "Multiple properties that generate the same initial :db/ident" (let [conn (db-test/create-conn-with-blocks [])]