This repository has been archived by the owner on Feb 1, 2024. It is now read-only.
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.
Overview
When deleting a facility with multiple confirmed or automatic matches,
we attempt to split off and create a new facility from the top match.
In the case that the match was missing a location, this caused a null
location error, preventing the facility from being deleted.
Matches without locations are now filtered out when searching for valid
matches to use to create a new facility during the deletion process.
Connects Client #49
Notes
If the match without a location is the only automatic/confirmed match other than the primary facility match, no new facility will be created when deleting a facility. Potentially, we could instead send a descriptive error message to the user in this case, to allow them to choose to move the match before deleting; but this has the downside of preventing them from deleting the facility at all unless they transfer the match, forcing their hand, which seems like very undesired behavior.
See here for the Rollbar error that occurs when attempting to delete the facility indicated in the issue. It is the same error as previously occurred in the
split
API when users attempted to split a match with no location.Testing Instructions
develop
, run./scripts/server
and identify a facility with a confirmed or automatic match in addition to the primary match../scripts/manage shell_plus
.Checklist
fixup!
commits have been squashed