Room planner: fix category exclusion field name (category_id not site_category_id)

NewBook API returns category_id on site objects; exclusion check was using
the non-existent site_category_id field so excluded categories config never worked.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
jtricerolph 2026-07-04 12:09:16 +00:00
parent 0d14473daf
commit 3c4bdd9a1c

View file

@ -180,7 +180,7 @@ export async function roomRoutes(app) {
// Classify each site
const rooms = []
for (const site of sites) {
const catId = String(site.site_category_id || '')
const catId = String(site.site_category_id ?? site.category_id ?? site.category?.id ?? '')
const isExcluded = excludedCategories.includes(catId)
if (isExcluded && hideExcluded) continue