Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FEAT] Add excluded categories in range #4261

Merged
merged 1 commit into from
Apr 22, 2024
Merged

Conversation

samar-hassan
Copy link
Contributor

When Includes all products is checked in the range, adding categories in the excluded categories field with remove the related products of those categories from the range.

# extend filter for parent categories, exclude parent = None
if (
Product.objects.exclude(parent=None)
.filter(parent__categories__in=expanded_range_categories)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why do we check for this? can't we just always add the extra parent query to the exclude?

@specialunderwear specialunderwear merged commit f09739a into master Apr 22, 2024
20 checks passed
@specialunderwear specialunderwear deleted the excluded-categories branch April 22, 2024 11:46
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.

None yet

3 participants