dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #20888
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 9742: Null check
------------------------------------------------------------
revno: 9742
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-02-05 21:20:14 +0200
message:
Null check
modified:
dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.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/patient/ShowAddPatientFormAction.java'
--- dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java 2013-02-04 16:14:38 +0000
+++ dhis-2/dhis-web/dhis-web-caseentry/src/main/java/org/hisp/dhis/caseentry/action/patient/ShowAddPatientFormAction.java 2013-02-05 19:20:14 +0000
@@ -38,7 +38,6 @@
import org.hisp.dhis.ouwt.manager.OrganisationUnitSelectionManager;
import org.hisp.dhis.patient.PatientAttribute;
import org.hisp.dhis.patient.PatientAttributeGroup;
-import org.hisp.dhis.patient.PatientAttributeGroupService;
import org.hisp.dhis.patient.PatientAttributeService;
import org.hisp.dhis.patient.PatientIdentifierType;
import org.hisp.dhis.patient.PatientIdentifierTypeService;
@@ -188,8 +187,12 @@
Program program = programService.getProgram( programId );
PatientRegistrationForm patientRegistrationForm = patientRegistrationFormService
.getPatientRegistrationForm( program );
- customRegistrationForm = patientRegistrationFormService.prepareDataEntryFormForAdd( patientRegistrationForm
- .getDataEntryForm().getHtmlCode(), healthWorkers, null, null, i18n, format );
+
+ if ( patientRegistrationForm != null )
+ {
+ customRegistrationForm = patientRegistrationFormService.prepareDataEntryFormForAdd( patientRegistrationForm
+ .getDataEntryForm().getHtmlCode(), healthWorkers, null, null, i18n, format );
+ }
}
if ( customRegistrationForm == null )
@@ -229,7 +232,6 @@
}
}
}
-
}
return SUCCESS;