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

Hello

I noticed something like that on one our instance.
It was due to the sort_order not beginning at 1 or having gaps in the order

not sure it’s fixable through the api/maintenance screen

I had to locate the optionvalue for that optionSet, then figure out the update needed

select * from optionvalue where optionsetid = 121
update optionvalue set sort_order = 1 where optionvalueid = xxx

and finally restart dhis2 or clear the cache in the data administration screen.

see optionSet api return null in the options

2 Likes