=== modified file 'dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/PatientDeletionHandler.java' --- dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/PatientDeletionHandler.java 2013-08-23 16:05:01 +0000 +++ dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/PatientDeletionHandler.java 2013-09-10 13:40:30 +0000 @@ -28,13 +28,13 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -import java.util.Collection; - import org.hisp.dhis.organisationunit.OrganisationUnit; import org.hisp.dhis.program.Program; import org.hisp.dhis.system.deletion.DeletionHandler; import org.springframework.jdbc.core.JdbcTemplate; +import java.util.Collection; + public class PatientDeletionHandler extends DeletionHandler { @@ -82,13 +82,13 @@ @Override public void deletePatientAttribute( PatientAttribute patientAttribute ) { - jdbcTemplate.execute( "delete from patient_attributes where patientattributeid=" + patientAttribute.getId() ); + jdbcTemplate.execute( "delete from patient_attributes where patientattributeid=" + patientAttribute.getId() ); } @Override public String allowDeleteOrganisationUnit( OrganisationUnit unit ) { - return patientService.getPatients( unit, null, null ).size() == 0 ? null : ERROR; + return patientService.getPatients( unit, 0, Integer.MAX_VALUE ).size() == 0 ? null : ERROR; } @Override