dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #15286
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 5468: Case entry, minor fix
------------------------------------------------------------
revno: 5468
committer: Lars Helge Overland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Mon 2011-12-19 09:18:37 +0100
message:
Case entry, minor fix
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadAnonymousProgramsAction.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/LoadAnonymousProgramsAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadAnonymousProgramsAction.java 2011-12-16 06:45:30 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/caseentry/LoadAnonymousProgramsAction.java 2011-12-19 08:18:37 +0000
@@ -27,6 +27,7 @@
package org.hisp.dhis.caseentry.action.caseentry;
+import java.util.ArrayList;
import java.util.Collection;
import org.hisp.dhis.organisationunit.OrganisationUnit;
@@ -75,7 +76,7 @@
// Output
// -------------------------------------------------------------------------
- private Collection<ProgramInstance> programInstances;
+ private Collection<ProgramInstance> programInstances = new ArrayList<ProgramInstance>();
public Collection<ProgramInstance> getProgramInstances()
{
@@ -95,7 +96,10 @@
{
Collection<Program> programs = programService.getPrograms( true, true, orgunit );
- programInstances = programInstanceService.getProgramInstances( programs );
+ if ( programs != null && programs.size() > 0 )
+ {
+ programInstances = programInstanceService.getProgramInstances( programs );
+ }
}
return SUCCESS;