dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #14790
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5120: Null exception thrown when creating new program stage.
------------------------------------------------------------
revno: 5120
committer: Tran Chau <tran.hispvietnam@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-11-07 09:53:47 +0700
message:
Null exception thrown when creating new program stage.
modified:
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java
dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.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-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java 2011-10-27 03:12:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/AddProgramStageAction.java 2011-11-07 02:53:47 +0000
@@ -156,7 +156,7 @@
programStage.setStageInProgram( program.getProgramStages().size() + 1 );
programStage.setProgram( program );
- irregular = irregular ? irregular : false;
+ irregular = (irregular==null) ? false : irregular;
programStage.setIrregular(irregular);
minDaysFromStart = (minDaysFromStart == null) ? 0 : minDaysFromStart;
=== modified file 'dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java'
--- dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java 2011-10-27 03:12:50 +0000
+++ dhis-2/dhis-web/dhis-web-maintenance/dhis-web-maintenance-patient/src/main/java/org/hisp/dhis/patient/action/programstage/UpdateProgramStageAction.java 2011-11-07 02:53:47 +0000
@@ -149,7 +149,7 @@
minDaysFromStart = (minDaysFromStart == null) ? 0 : minDaysFromStart;
programStage.setMinDaysFromStart( minDaysFromStart );
- irregular = irregular ? irregular : false;
+ irregular = (irregular==null) ? false : irregular;
programStage.setIrregular( irregular );
programStageService.updateProgramStage( programStage );