Bug fix for https://github.com/fleetdm/fleet/pull/42063 **Related issue:** Resolves #40057 # Checklist for submitter ## Testing - [x] Added/updated automated tests - [x] QA'd all new/changed functionality manually For unreleased bug fixes in a release candidate, one of: - [ ] Confirmed that the fix is not expected to adversely impact load test results --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>