Ok so I swear this worked a week ago but I can’t find a SB version to roll back to that fixes the issue, so maybe I’m delusional.
I have the following query
${query[[
from page = index.tag "page"
where page.name:startsWith("Contact/") and page.foreign
select {
Name = page.name,
Status = page.foreign.status,
Reported = page.foreign.reported,
}
order by name
]]}
This query works.
I can see the foreign.status and foreign.reported subattributes in the table just fine.
However, when I try to query for only those pages that have a subattribute foreign.reported value of false, I get an error:
${query[[
from page = index.tag "page"
where page.name:startsWith("Contact/") and page.foreign.reported == false
select {
Name = page.name,
Status = page.foreign.status,
Reported = page.foreign.reported,
}
order by name
]]}
returns:
Lua error: Attempting to index a nil value
The frontmatter in question is formatted as such:
foreign:
status: true
reported: false
Any advice?
Thanks!