Re: [Dhis2-devs] Assigning org unit to program via API

2014-08-26 Thread Morten Olav Hansen
Hi Mahendra If you want to update a program, you need to use a PUT request to the /api/programs/id It's saying Object already exists because the uid already exists in the system. Btw, you need to send the full payload, we don't support partial updates. -- Morten On Tue, Aug 26, 2014 at 4:06

Re: [Dhis2-devs] Assigning org unit to program via API

2014-08-26 Thread Morten Olav Hansen
Hi What version of dhis are you using? and what revision? there have been changes to this in 2.16 vs trunk, which can cause issues like that (your db will only be valid with either 2.16 or trunk, you can't switch between them) Also make sure that you are using newest trunk or newest 2.16, since

Re: [Dhis2-devs] Assigning org unit to program via API

2014-08-26 Thread Morten Olav Hansen
Try removing not-null=true (or removing the whole property) from ProgramStage.hbm.xml on the sortOrder property, not sure if its enough though.. You can see the current ProgramStage.hbm.xml (from trunk) here: