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 isArchived and isGlobal filtering in extendFind endpoint #1168

Merged
merged 4 commits into from
Feb 6, 2025

Conversation

CollinBeczak
Copy link
Contributor

@CollinBeczak CollinBeczak commented Feb 6, 2025

Resolves: maproulette/maproulette3#2532
Issue
The /api/v2/challenges/extendedFind endpoint was not correctly handling archived and global challenge filtering. The issue arose because the filter condition was always evaluating as false. This happened because the filter was being wrapped in Some(value) (e.g., Some(false) or Some(true)) instead of directly evaluating the value.

Fix Details
This PR updates the condition to handle the wrapped Some(value) correctly, ensuring that the filtering logic now behaves as expected. This is done by adding a default to the variable being filtered. This resolves the bug affecting archived and global challenge filtering.

Copy link

sonarqubecloud bot commented Feb 6, 2025

@CollinBeczak CollinBeczak merged commit 07b782b into main Feb 6, 2025
9 checks passed
@CollinBeczak CollinBeczak deleted the Collin/fix-isarchived-and-isglobal-filtering2 branch February 6, 2025 01:37
jschwarz2030 pushed a commit that referenced this pull request Feb 11, 2025
* fix isArchived and isGlobal filtering in extendFind endpoint

* fix spelling error

* set the default of isGlobal to true

* fix issue with string values, convert them to booleans
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.

When browsing projects I don't see any challenges
1 participant