Skip to content

Commit

Permalink
fix: [DHIS2-15340] use orgunit of selected event before owning orgunit (
Browse files Browse the repository at this point in the history
  • Loading branch information
superskip authored May 25, 2023
1 parent 2967bf0 commit 82aee94
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion d2-tracker/dhis2.angular.services.js
Original file line number Diff line number Diff line change
Expand Up @@ -3317,7 +3317,7 @@ var d2Services = angular.module('d2Services', ['ngResource'])
* @param {*} flag execution flags
*/
var internalFetchContextData = function(selectedEnrollment,executingEvent){
return OrgUnitFactory.getFromStoreOrServer( selectedEnrollment ? selectedEnrollment.orgUnit : executingEvent.orgUnit )
return OrgUnitFactory.getFromStoreOrServer(executingEvent && executingEvent.orgUnit ? executingEvent.orgUnit : selectedEnrollment.orgUnit)
.then(function (orgUnit) {
var data = { selectedOrgUnit: orgUnit, selectedProgramStage: null};
if(executingEvent && executingEvent.program && executingEvent.programStage){
Expand Down

0 comments on commit 82aee94

Please sign in to comment.