Skip to content

Fixes #22717: Correct Device Cluster Location validation#22725

Merged
arthanson merged 1 commit into
mainfrom
22717-device-validation-raises-keyerror-when-assigned-cluster-is
Jul 21, 2026
Merged

Fixes #22717: Correct Device Cluster Location validation#22725
arthanson merged 1 commit into
mainfrom
22717-device-validation-raises-keyerror-when-assigned-cluster-is

Conversation

@pheus

@pheus pheus commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Closes: #22717

Corrects device validation when its assigned cluster is scoped to a different location.

The validation message expects a location formatting argument, but the value was supplied using the site keyword. This caused a KeyError before the intended field validation error could be raised.

Adds a regression test covering two locations within the same site and verifies the expected cluster validation message.

…error

Changes 'site' to 'location' in the error message format string to match
the actual parameter name being passed. Adds regression test coverage to
verify the error message displays the correct location name.

Fixes #22717
@pheus

pheus commented Jul 21, 2026

Copy link
Copy Markdown
Contributor Author

@claude /review Only report on issues of potential concern; we don't need commentary on anything that doesn't require further consideration.

@github-actions

github-actions Bot commented Jul 21, 2026

Copy link
Copy Markdown
Contributor

Claude finished @pheus's task in 1m 24s —— View job


No issues of concern found. The one-line fix correctly changes the format keyword argument from site= to location= to match the {location} placeholder in the error string (devices.py:948), and the regression test validates both the pass case and the exact error message text.

@pheus
pheus marked this pull request as ready for review July 21, 2026 08:10
@pheus
pheus requested review from a team and arthanson and removed request for a team July 21, 2026 08:10
@arthanson
arthanson merged commit f9a90f3 into main Jul 21, 2026
18 checks passed
@arthanson
arthanson deleted the 22717-device-validation-raises-keyerror-when-assigned-cluster-is branch July 21, 2026 15:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Device validation raises KeyError when assigned cluster is scoped to a different location

2 participants