mirror of
https://github.com/logseq/logseq.git
synced 2026-05-01 09:26:28 +00:00
fix: query logging console error if no matching closed value
e.g. (property :status "tod"). Part of LOG-3088
This commit is contained in:
@@ -275,10 +275,13 @@
|
||||
property (db-property/get-property (conn/get-db) k)
|
||||
values (get-in property [:block/schema :values])
|
||||
v' (if (seq values) ; closed values
|
||||
(some #(when-let [closed-value (get-in (db-utils/entity [:block/uuid %]) [:block/schema :value])]
|
||||
(when (= v closed-value)
|
||||
%))
|
||||
values)
|
||||
(or
|
||||
(some #(when-let [closed-value (get-in (db-utils/entity [:block/uuid %]) [:block/schema :value])]
|
||||
(when (= v closed-value)
|
||||
%))
|
||||
values)
|
||||
;; rule needs a non nil value to not error
|
||||
"_stub_value_so_that_query_doesnt_error_")
|
||||
v)]
|
||||
{:query (list 'property '?b (->keyword-property k) v')
|
||||
:rules [:property]}))
|
||||
|
||||
Reference in New Issue
Block a user