Skip to content

Fix scope calculation dropping existing assets when target is edited#143

Merged
TheTechromancer merged 3 commits intodevfrom
fix-target-bug
Mar 26, 2026
Merged

Fix scope calculation dropping existing assets when target is edited#143
TheTechromancer merged 3 commits intodevfrom
fix-target-bug

Conversation

@TheTechromancer
Copy link
Copy Markdown
Collaborator

When editing a target (e.g. adding a domain), all previously in-scope assets lost their scope — only the newly added domain would remain in scope.

Root cause: In refresh_asset_scope, when _check_scope returned None (meaning "no change — host was already in scope"), the else catch-all treated it as out-of-scope and removed the target from the asset. Changed else to elif scope_result_type == "ASSET_SCOPE_CHANGED" so that None (no change) correctly leaves scope untouched.

Includes a regression test that reproduces the exact bug.

@TheTechromancer TheTechromancer merged commit a1273ba into dev Mar 26, 2026
10 checks passed
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.

2 participants