dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41092
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 20911: minor fix, EventService.updateProgramStageInstance make updates to PSI object, so we need to upda...
------------------------------------------------------------
revno: 20911
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2015-11-02 08:57:54 +0700
message:
minor fix, EventService.updateProgramStageInstance make updates to PSI object, so we need to update and refresh the object to make sure its in the active hibernate session
modified:
dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== modified file 'dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java'
--- dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2015-10-23 04:36:05 +0000
+++ dhis-2/dhis-services/dhis-service-dxf2/src/main/java/org/hisp/dhis/dxf2/events/event/AbstractEventService.java 2015-11-02 01:57:54 +0000
@@ -1087,6 +1087,11 @@
programStageInstance.setAutoFields();
sessionFactory.getCurrentSession().save( programStageInstance );
}
+ else
+ {
+ sessionFactory.getCurrentSession().update( programStageInstance );
+ sessionFactory.getCurrentSession().refresh( programStageInstance );
+ }
if ( programStageInstance.isCompleted() )
{