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

fix: "NOT IN" doesn't apply filter properly #5154

Open
wants to merge 7 commits into
base: mealie-next
Choose a base branch
from

Conversation

michael-genson
Copy link
Collaborator

What this PR does / why we need it:

(REQUIRED)

Currently "NOT IN" (or "does not contain" on the frontend) only filters out recipes that have exactly those items, rather than those items and maybe other ones. For example:

Recipe1: tagA, tagB, tagC
Recipe2: tagA
Recipe3: tagB

If I query for NOT IN [tagA], I would assume the only result would be Recipe3. Currently I will get both Recipe1 and Recipe3, which is incorrect.

This PR fixes this issue, as well as a related issue if a recipe has no records (e.g. zero tags).

Which issue(s) this PR fixes:

(REQUIRED)

Fixes #5063 (recipes with no tags)
Fixes #5151 (recipes with mismatched categories)

Testing

(fill-in or delete this section)

Updated our tests to catch these issues.

@github-actions github-actions bot added the bugfix label Mar 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
1 participant