dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #34214
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17565: Fix nullPointer in /api/dataApprovals/status
------------------------------------------------------------
revno: 17565
committer: jimgrace@xxxxxxxxx
branch nick: dhis2
timestamp: Fri 2014-11-21 11:45:43 -0500
message:
Fix nullPointer in /api/dataApprovals/status
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataApprovalController.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-api/src/main/java/org/hisp/dhis/webapi/controller/DataApprovalController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataApprovalController.java 2014-11-07 01:55:41 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/webapi/controller/DataApprovalController.java 2014-11-21 16:45:43 +0000
@@ -243,7 +243,7 @@
DataApproval dataApproval = status.getDataApproval();
Date createdDate = dataApproval == null ? null : dataApproval.getCreated();
- String createdByUsername = dataApproval == null ? null : dataApproval.getCreator().getUsername();
+ String createdByUsername = dataApproval == null || dataApproval.getCreator() == null ? null : dataApproval.getCreator().getUsername();
String state = status.getState().toString();