dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22060
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 10577: check for programStageId
------------------------------------------------------------
revno: 10577
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-04-16 16:09:37 +0700
message:
check for programStageId
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/RemoveEmptyEventsAction.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-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/RemoveEmptyEventsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/RemoveEmptyEventsAction.java 2012-11-07 15:43:51 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/RemoveEmptyEventsAction.java 2013-04-16 09:09:37 +0000
@@ -37,7 +37,6 @@
/**
* @author Chau Thu Tran
- *
* @version RemoveEmptyEventsAction.java Jul 3, 2012 $
*/
public class RemoveEmptyEventsAction
@@ -86,8 +85,13 @@
public String execute()
throws Exception
{
+ if ( programStageId == null )
+ {
+ return INPUT;
+ }
+
ProgramStage programStage = programStageService.getProgramStage( programStageId );
-
+
OrganisationUnit organisationUnit = selectionManager.getSelectedOrganisationUnit();
programStageInstanceService.removeEmptyEvents( programStage, organisationUnit );