Hi everyone,
After upgrading our DHIS2 instance from 2.38 to 2.40.5, I’m encountering an issue when accessing certain option sets.
When I try to access an option set via the API, I receive the following error:
“Can not add a Model without id to a ModelCollection”
The JSON response shows that some options are null
:
{
"options": [
null,
null,
null,
{"name": "Gastro-enterologist", "id": "XCztWMFzC8P"},
{"name": "Internist", "id": "IGvGP4cQ2WF"},
{"name": "Infectiologist", "id": "lTu8wpea8BK"}
]
}
Context:
- The upgrade was from 2.38 to 2.40.5.
- These option sets were working correctly before the upgrade.
Questions:
- Were there any changes in option set management between these versions?
- How can I effectively identify and fix these
null
options? - Are there any scripts or tools to clean corrupted option sets after a migration?
Thank you in advance for your help!