bug: wizard step 7 loses search titles — nested key extraction reads wrong level #125

Open
opened 2026-06-15 16:36:08 -07:00 by pyr0ball · 0 comments
Owner

Summary

Wizard sends { search: { titles: [...], locations: [...], remote_only: false } } as the step 7 payload, but the wizard_save_step handler reads data.get("titles", []) from the top-level data dict instead of data["search"]["titles"]. Result: titles and locations are always saved as empty arrays regardless of what the user entered.

Fix

Read from the nested search key with a fallback for direct API callers:

search = data.get("search", {})
titles = search.get("titles", data.get("titles", data.get("job_titles", [])))
locations = search.get("locations", data.get("locations", []))
remote_only = search.get("remote_only", data.get("remote_only", False))

Impact

Every user who sets job titles during the wizard will see an empty Search Prefs page in Settings.

## Summary Wizard sends `{ search: { titles: [...], locations: [...], remote_only: false } }` as the step 7 payload, but the `wizard_save_step` handler reads `data.get("titles", [])` from the top-level `data` dict instead of `data["search"]["titles"]`. Result: titles and locations are always saved as empty arrays regardless of what the user entered. ## Fix Read from the nested `search` key with a fallback for direct API callers: ```python search = data.get("search", {}) titles = search.get("titles", data.get("titles", data.get("job_titles", []))) locations = search.get("locations", data.get("locations", [])) remote_only = search.get("remote_only", data.get("remote_only", False)) ``` ## Impact Every user who sets job titles during the wizard will see an empty Search Prefs page in Settings.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#125
No description provided.