dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #22992
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 11180: Web API, check if report does not exist
------------------------------------------------------------
revno: 11180
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Sun 2013-06-09 23:26:26 +0200
message:
Web API, check if report does not exist
modified:
dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportController.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/api/controller/ReportController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportController.java 2013-04-30 11:27:03 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ReportController.java 2013-06-09 21:26:26 +0000
@@ -175,6 +175,12 @@
{
Report report = reportService.getReport( uid );
+ if ( report == null )
+ {
+ ContextUtils.notFoundResponse( response, "Report does not exist: " + uid );
+ return null;
+ }
+
if ( organisationUnitUid == null && report.hasReportTable() && report.getReportTable().hasReportParams()
&& report.getReportTable().getReportParams().isOrganisationUnitSet() )
{