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.
Brief overview of changes
Fixed a bug that happened in files with only one region column present and no region rows.
Why are these changes being made?
The app currently will error and then crash with no feedback to users, we want to do better than that and always give feedback on failing files.
Example when running the app locally on the main branch with the test files (same error in the prod logs)
Detailed description of changes
region_combinations()
test to only execute if both region_name and region_code columns are presentcountry_combinations()
test to remove the check for country_code being present as no file can get to the main checks stage without itAdditional information for reviewers
The test I've fixed -
region_combinations()
doesn't need to fail if only one region column is present as another testregion_col_present()
checks for this already.To make it easy to test, you can use the test data files I've added in this PR, try screening them against the current prod version - https://rsconnect/rsc/dfe-published-data-qa/, and then try doing the same on the dev environment (where this has deployed to after I opened the PR - https://rsconnect-pp/rsc/dev-dfe-published-data-qa/). You should see the app on prod will crash but it'll handle it neatly on the dev environment.
Issue ticket number/s and link
No related issues