Skip to content

fix: custom exclude filter crashes when custom imports is set but custom exclude is not#234

Open
jimisola wants to merge 1 commit intomainfrom
fix/custom-exclude-guard-233
Open

fix: custom exclude filter crashes when custom imports is set but custom exclude is not#234
jimisola wants to merge 1 commit intomainfrom
fix/custom-exclude-guard-233

Conversation

@jimisola
Copy link
Member

Summary

  • Fixes a crash in both the requirements and SVC filter methods where parse_el(None) was called when custom_imports was set but custom_exclude was absent
  • The guard condition checked custom_imports is None instead of custom_exclude is None in two places — a copy-paste error affecting both __get_filtered_out_requirements_for_filter_urn and __get_filtered_out_svcs_for_filter_urn

Fixes #233, refs #222.

Test plan

  • All existing unit tests pass (94 passed)
  • Manual verification with a filter that has custom_imports set but no custom_exclude

…tom exclude is not

The guard condition for building the custom exclude expression tree
checked custom_imports is None instead of custom_exclude is None in
both __get_filtered_out_requirements_for_filter_urn and
__get_filtered_out_svcs_for_filter_urn.

When custom_imports was set but custom_exclude was absent, parse_el(None)
was called, causing a runtime crash.

Fixes #233, refs #222.
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.

bug: custom exclude filter crashes when custom imports filter is set but custom exclude is not

1 participant