ADX-985 Fixing pivot table pulls for cases where no dhis2 indicators selected #109
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.
Description
After introducing support for DHIS2 indicators it may happen that only dhis2 elements or only dhis2 indicators are selected for the pulls. This situation was not supported by the harvester and was causing issues downstream of the ETL (500 errors from DHIS2 complaining about incorrect API requests).
This fix prevents asking DHIS2 for indicators/data elements if no entries of this type exists for this pivot table configuration.
(This is a high-priority request for the client so I'm going ahead with deploying the change yet I still asking someone for post-merge review, please)
Checklist
Put an
x
in the boxes that apply to this pull request (you can also fill these out after opening the pull request).You may not need to check all boxes.