mirror of
https://github.com/logseq/logseq.git
synced 2026-05-28 14:39:48 +00:00
fix: only add schema to property when it exists
This ensures that we can always validate schema as having a :type which is important for a property's validity
This commit is contained in:
@@ -75,10 +75,11 @@
|
||||
{:outliner-op :save-block}))
|
||||
(when (nil? property) ;if property not exists yet
|
||||
(db/transact! repo [(sqlite-util/build-new-property
|
||||
{:block/schema schema
|
||||
:block/original-name k-name
|
||||
:block/name (util/page-name-sanity-lc k-name)
|
||||
:block/uuid property-uuid})]
|
||||
(cond-> {:block/original-name k-name
|
||||
:block/name (util/page-name-sanity-lc k-name)
|
||||
:block/uuid property-uuid}
|
||||
(seq schema)
|
||||
(assoc :block/schema schema)))]
|
||||
{:outliner-op :insert-blocks}))))
|
||||
|
||||
(defn- reset-block-property-multiple-values!
|
||||
|
||||
Reference in New Issue
Block a user