fix(regression): can't edit property name from config

This commit is contained in:
Gabriel Horner
2025-01-20 14:16:15 -05:00
parent 69f5818604
commit bcd1d33940
2 changed files with 10 additions and 7 deletions

View File

@@ -121,10 +121,11 @@
(conj (outliner-core/block-with-updated-at
(merge {:db/ident db-ident}
changed-property-attrs)))
(or (not= (:logseq.property/type schema) (:logseq.property/type property))
(and (:db/cardinality schema) (not= (:db/cardinality schema) (keyword (name (:db/cardinality property)))))
(and (= :default (:logseq.property/type schema)) (not= :db.type/ref (:db/valueType property)))
(seq (:property/closed-values property)))
(and (seq schema)
(or (not= (:logseq.property/type schema) (:logseq.property/type property))
(and (:db/cardinality schema) (not= (:db/cardinality schema) (keyword (name (:db/cardinality property)))))
(and (= :default (:logseq.property/type schema)) (not= :db.type/ref (:db/valueType property)))
(seq (:property/closed-values property))))
(concat (update-datascript-schema property schema)))
tx-data (concat property-tx-data
(when (seq properties)

View File

@@ -188,9 +188,11 @@
:variant (if dirty? :default :secondary)
:on-click (fn []
(set-saving! true)
(-> [(db-property-handler/set-block-property!
(:db/id property)
:logseq.property/icon (:icon form-data))
(-> [(db-property-handler/upsert-property!
(:db/ident property)
{}
{:property-name title
:properties {:logseq.property/icon (:icon form-data)}})
(when (not= description (:description (rum/deref *form-data)))
(set-property-description! property description))]
(p/all)