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 error when cycling the dropdown filter options in advanced search #11442 #11706

Conversation

MikeGriniezakis
Copy link
Contributor

In the error report, cyling between "references" and "does not reference" produce a "NoneType is not iterable" error. This was due to the fact that when a value is selected in the dropdown, the value is set to null if the string is an empty string.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Description of Change

Cycling between "references" and "does not reference" produces a "NoneType is not iterable" error.
This was due to the fact that when a value is selected in the drop-down, the value is set to null if the string
is an empty string. In the example provided in the issue report, the "references" entry has an id of "".
Upon selecting it, the change event is fired and the value is set to null.

This PR removes the logic that converted the empty string to null when the change event is fired.

Issues Solved

Closes #11442

Checklist

  • I targeted one of these branches:
    • dev/8.0.x (under development): features, bugfixes not covered below
    • dev/7.6.x (main support): regressions, crashing bugs, security issues, major bugs in new features
    • dev/6.2.x (extended support): major security issues, data loss issues
  • I added a changelog in arches/releases
  • I submitted a PR to arches-docs (if appropriate)
  • Unit tests pass locally with my changes
  • I added tests that prove my fix is effective or that my feature works
  • My test fails on the target branch

In the error report, cyling between "references" and "does not reference"
produce a "NoneType is not iterable" error. This was due to the fact that
when a value is selected in the dropdown, the value is set to null if the string
is an empty string.
@jacobtylerwalls jacobtylerwalls changed the title Fix error when cycling the dropdown fitler options in advanced search #11442 Fix error when cycling the dropdown filter options in advanced search #11442 Dec 23, 2024
@chiatt chiatt requested a review from apeters January 9, 2025 16:23
Copy link
Member

@apeters apeters left a comment

Choose a reason for hiding this comment

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

looks good to me

@apeters apeters merged commit 3a7ef78 into archesproject:dev/8.0.x Jan 10, 2025
7 checks passed
@whatisgalen
Copy link
Member

whatisgalen commented Jan 13, 2025

@apeters @MikeGriniezakis it seems like this PR was missing code from a commit -- all I see are some changes in spacing which doesn't match up with the commit message in 57cb9ea

@MikeGriniezakis
Copy link
Contributor Author

@whatisgalen The actual fix for this issue is the removal of the if clause in lines 125-128

@whatisgalen
Copy link
Member

@MikeGriniezakis Yes you are right -- I don't know how my eyes skipped over those lines!

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.

Advanced search - argument 'NoneType' is not iterable
3 participants