← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 12020: Minor fix

 

------------------------------------------------------------
revno: 12020
committer: Morten Olav Hansen <mortenoh@xxxxxxxxx>
branch nick: dhis2
timestamp: Tue 2013-09-10 15:40:30 +0200
message:
  Minor fix
modified:
  dhis-2/dhis-services/dhis-service-patient/src/main/java/org/hisp/dhis/patient/PatientDeletionHandler.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-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