← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 13906: Config resource, minor fix

 

------------------------------------------------------------
revno: 13906
committer: Lars Helge Øverland <larshelge@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-01-31 14:49:23 +0200
message:
  Config resource, minor fix
modified:
  dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ConfigurationController.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/ConfigurationController.java'
--- dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ConfigurationController.java	2014-01-31 12:41:52 +0000
+++ dhis-2/dhis-web/dhis-web-api/src/main/java/org/hisp/dhis/api/controller/ConfigurationController.java	2014-01-31 12:49:23 +0000
@@ -30,6 +30,7 @@
 
 import javax.servlet.http.HttpServletRequest;
 
+import org.hisp.dhis.common.BaseIdentifiableObject;
 import org.hisp.dhis.configuration.ConfigurationService;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Controller;
@@ -74,7 +75,10 @@
     @RequestMapping( value = "/infrastructuralPeriodType", method = RequestMethod.GET )
     private String getInfrastructuralPeriodType( Model model, HttpServletRequest request )
     {
-        return setModel( model, configurationService.getConfiguration().getInfrastructuralPeriodTypeDefaultIfNull().getName() );
+        String name = configurationService.getConfiguration().getInfrastructuralPeriodTypeDefaultIfNull().getName();
+        BaseIdentifiableObject entity = new BaseIdentifiableObject( name, name, name );
+        
+        return setModel( model, entity );
     }
 
     @RequestMapping( value = "/selfRegistrationRole", method = RequestMethod.GET )