-
Notifications
You must be signed in to change notification settings - Fork 1
Closed
Labels
Description
Search first
- I searched and no similar issues were found
What Happened?
I had an advanced query working, added the following code and got a "Something went wrong" error
:result-transform (fn [results]
(sort-by (fn [h]
(or (get h :logseq.task/scheduled)
;; Default to nil if no scheduled date
(get h :logseq.task/deadline))) results))Full query is below:
{
:query [:find (pull ?b [*])
:in $ ?end-time
:where
(task ?b #{"Backlog" "Todo" "Doing" "In Review"})
(not (page-ref ?b "template"))
(or-join (?b ?end-time)
(priority ?b #{"Urgent"})
(and
(priority ?b #{"High"})
(or [?b :logseq.task/scheduled ?n][?b :logseq.task/deadline ?n])
[(<= ?n ?end-time)]
)
)
]
:inputs [:+7d-ms]
:result-transform (fn [results]
(sort-by (fn [h]
(or (get h :logseq.task/scheduled)
;; Default to nil if no scheduled date
(get h :logseq.task/deadline))) results))
:breadcrumb-show? true
:group-by-page? true
:collapsed? true
}This error occurs at the page level, if viewing the query at the node level or through a Linked reference it seems to work fine.
Reproduce the Bug
Expected Behavior
If the error is query related, it should just not render or throw a warning error on the page
Files
logseq_db_Templates-debug-datoms_1742810006.zip
Browser, Desktop or Mobile Platform Information
No response
Additional Context
No response
Are you willing to submit a PR? If you know how to fix the bug.
- I'm willing to submit a PR (Thank you!)
