Skip to content

Commit 561f422

Browse files
committed
fix: e2e tests
1 parent 1662497 commit 561f422

File tree

2 files changed

+19
-22
lines changed

2 files changed

+19
-22
lines changed

src/main/frontend/commands.cljs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -791,7 +791,7 @@
791791
[priority]
792792
(when-let [block (state/get-edit-block)]
793793
(if (nil? priority)
794-
(db-property-handler/remove-block-property! (:block/uuid block) :logseq.property/priority)
794+
(db-property-handler/set-block-property! (:block/uuid block) :logseq.property/priority :logseq.property/empty-placeholder)
795795
(db-property-handler/batch-set-property-closed-value! [(:block/uuid block)] :logseq.property/priority priority))))
796796

797797
(defmethod handle-step :editor/set-priority [[_ priority] _format]

src/main/logseq/api/db_based.cljs

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -120,27 +120,24 @@
120120
[this k schema opts]
121121
(p/let [k' (api-block/sanitize-user-property-name k)
122122
property-ident (api-block/get-db-ident-from-property-name k' this)
123-
property (db/entity property-ident)]
124-
(if property
125-
property
126-
(p/let [_ (api-block/ensure-property-upsert-control this property-ident k')
127-
schema (or (some-> schema bean/->clj
128-
(update-keys #(if (contains? #{:hide :public} %)
129-
(keyword (str (name %) "?")) %)))
130-
{})
131-
_ (when (:type schema)
132-
(schema-type-check! (keyword (:type schema))))
133-
schema (cond-> schema
134-
(string? (:cardinality schema))
135-
(-> (assoc :db/cardinality (->cardinality (:cardinality schema)))
136-
(dissoc :cardinality))
137-
138-
(string? (:type schema))
139-
(-> (assoc :logseq.property/type (keyword (:type schema)))
140-
(dissoc :type)))
141-
p (db-property-handler/upsert-property! property-ident schema
142-
(assoc opts :property-name k'))]
143-
(db/entity (:db/id p))))))
123+
_ (api-block/ensure-property-upsert-control this property-ident k')
124+
schema (or (some-> schema
125+
(update-keys #(if (contains? #{:hide :public} %)
126+
(keyword (str (name %) "?")) %)))
127+
{})
128+
_ (when (:type schema)
129+
(schema-type-check! (keyword (:type schema))))
130+
schema (cond-> schema
131+
(string? (:cardinality schema))
132+
(-> (assoc :db/cardinality (->cardinality (:cardinality schema)))
133+
(dissoc :cardinality))
134+
135+
(string? (:type schema))
136+
(-> (assoc :logseq.property/type (keyword (:type schema)))
137+
(dissoc :type)))
138+
p (db-property-handler/upsert-property! property-ident schema
139+
(assoc opts :property-name k'))]
140+
(db/entity (:db/id p))))
144141

145142
(defn upsert-property
146143
"schema:

0 commit comments

Comments
 (0)