=== modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm' --- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm 2012-10-31 13:05:25 +0000 +++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/WEB-INF/dhis-web-mobile-velocity/data-entry.vm 2012-10-31 18:22:26 +0000 @@ -266,9 +266,13 @@ === modified file 'dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/dhis-web-mobile-resources/js/dhis2.storage.js' --- dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/dhis-web-mobile-resources/js/dhis2.storage.js 2012-10-30 15:56:17 +0000 +++ dhis-2/dhis-web/dhis-web-mobile/src/main/webapp/dhis-web-mobile-resources/js/dhis2.storage.js 2012-10-31 18:22:26 +0000 @@ -39,8 +39,17 @@ url : '../api/currentUser/forms', dataType : 'json' }).success(function ( data ) { - localStorage['organisationUnits'] = JSON.stringify(data.organisationUnits); - localStorage['forms'] = JSON.stringify(data.forms); + if( data.organisationUnits ) { + localStorage['organisationUnits'] = JSON.stringify(data.organisationUnits); + } else { + localStorage['organisationUnits'] = JSON.stringify({}); + } + + if( data.forms ) { + localStorage['forms'] = JSON.stringify(data.forms); + } else { + localStorage['forms'] = JSON.stringify({}); + } }); };