Fix bug with the location search on conditional alerts screen #35157
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Product Description
When selecting an organization as a recipient for a conditional alert, the search/dropdown to select a location does not work:
The dropdown is broken, so you can't select a new location recipeint for new/existing alerts, though existing alerts and their already-chosen recipients should be fine.
Introduced in #34912.
Technical Summary
The error message returned by the request to get the locations for the dropdown is:
This is because the recent changes introduced an init method
LocationOptionsController.__init__
which does not allow for other kwargs, likecase_sharing_only
. This PR allows for other kwargs to be passed to__init__
.Safety Assurance
Safety story
LocationOptionsController
is only used in two places, and you can see how its initiatedLocationsSearchViewTest
Automated test coverage
corehq.apps.locations.tests.test_views:LocationSearchViewTest
QA Plan
None planned.
Rollback instructions
(original bug would be re-introduced)
Labels & Review