Quantcast
Channel: DHIS2 Community - Latest topics
Viewing all articles
Browse latest Browse all 1519

Error after upgrading to DHIS2 2.40.5 - "Can not add a Model without id to a ModelCollection

$
0
0

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:

  1. Were there any changes in option set management between these versions?
  2. How can I effectively identify and fix these null options?
  3. Are there any scripts or tools to clean corrupted option sets after a migration?

Thank you in advance for your help!

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 1519

Trending Articles