Skip to content

fix(hybrid-cloud): Remove redundant self._base_query() call in _apply_filters#44973

Merged
dashed merged 1 commit into
masterfrom
hybrid-cloud/remove-redundant-base_query
Feb 23, 2023
Merged

fix(hybrid-cloud): Remove redundant self._base_query() call in _apply_filters#44973
dashed merged 1 commit into
masterfrom
hybrid-cloud/remove-redundant-base_query

Conversation

@dashed

@dashed dashed commented Feb 22, 2023

Copy link
Copy Markdown
Member

The call to self._base_query() in _apply_filters() is redundant as we already make this call in _query_many() here:

def _query_many(self, filter: FILTER_ARGS) -> QuerySet:
validation_error = self._filter_arg_validator()(filter)
if validation_error is not None:
raise TypeError(
f"Failed to validate filter arguments passed to {self.__class__.__name__}: {validation_error}"
)
query = self._base_query()
return self._apply_filters(query, filter)

@dashed dashed requested a review from a team February 22, 2023 19:22
@dashed dashed self-assigned this Feb 22, 2023
@github-actions github-actions Bot added the Scope: Backend Automatically applied to PRs that change backend components label Feb 22, 2023
@dashed dashed merged commit 20edd5d into master Feb 23, 2023
@dashed dashed deleted the hybrid-cloud/remove-redundant-base_query branch February 23, 2023 17:15
@github-actions github-actions Bot locked and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Backend Automatically applied to PRs that change backend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants