diff --git a/d2-tracker/dhis2.angular.services.js b/d2-tracker/dhis2.angular.services.js index 0a3a209f8..0168d2e6e 100644 --- a/d2-tracker/dhis2.angular.services.js +++ b/d2-tracker/dhis2.angular.services.js @@ -495,10 +495,10 @@ var d2Services = angular.module('d2Services', ['ngResource']) var fileNames = CurrentSelection.getFileNames() || {}; FileService.get(valueId).then(function(response){ if(response && response.displayName){ - if(!fileNames[event.event]){ - fileNames[event.event] = {}; + if(!fileNames[event]){ + fileNames[event] = {}; } - fileNames[event.event][dataElementId] = response.displayName; + fileNames[event][dataElementId] = response.displayName; CurrentSelection.setFileNames( fileNames ); } });