fix: queries

This commit is contained in:
Tienson Qin
2021-05-14 15:06:10 +08:00
parent 23a549dfde
commit 7949b7de9f
2 changed files with 27 additions and 34 deletions

View File

@@ -1935,15 +1935,8 @@
;; exclude the current one, otherwise it'll loop forever
remove-blocks (if current-block-uuid [current-block-uuid] nil)
query-result (and query-atom (rum/react query-atom))
result (cond
(and query-result dsl-query?)
(apply concat query-result)
query-result
(db/custom-query-result-transform query-result remove-blocks q)
:else
nil)
result (when query-result
(db/custom-query-result-transform query-result remove-blocks q))
view-f (and view (sci/eval-string (pr-str view)))
only-blocks? (:block/uuid (first result))
blocks-grouped-by-page? (and (seq result)