fix: Error when Program Indicators reference missing attributes#3
Merged
MiquelAdell merged 1 commit intoversion-101.33.1from May 14, 2025
Merged
Conversation
anagperal
approved these changes
Apr 29, 2025
anagperal
left a comment
There was a problem hiding this comment.
thanks @MatiasArriola !! [code-only review]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Related issue: https://app.clickup.com/t/86987atgk
After
v101.33.0when starting Capture app, an error is shownError log in dev console:
TypeError: programData.attributes[variableNameParts[0]] is undefinedIn this case, based on the metadata config for this DHIS2 instance, It failed because of an inconsistency in some Program Indicators referencing dataElements or attributes not present in the
programData.As a workaround, I added a check to avoid the unhandled TypeError and instead logged a warning and descriptive error, while allowing the app to load.