Skip to content

Commit

Permalink
avni-client#1234 - entity context was being passed as null
Browse files Browse the repository at this point in the history
  • Loading branch information
petmongrels committed Jan 11, 2024
1 parent 7ac345b commit 71eb8f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/openchs-android/src/service/RuleEvaluationService.js
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,7 @@ class RuleEvaluationService extends BaseService {
const nextVisits = rulesFromTheBundle
.reduce((schedule, rule) => {
General.logDebug(`RuleEvaluationService`, `Executing Rule: ${rule.name} Class: ${rule.fnName}`);
return this.runRuleAndSaveFailure(rule, entityName, entity, schedule, visitScheduleConfig, entityContext);
return this.runRuleAndSaveFailure(rule, entityName, entity, schedule, visitScheduleConfig, null, entityContext);
}, scheduledVisits);
General.logDebug("RuleEvaluationService - Next Visits", nextVisits);
return nextVisits;
Expand Down Expand Up @@ -541,7 +541,7 @@ class RuleEvaluationService extends BaseService {
const rulesFromTheBundle = this.getAllRuleItemsFor(formElementGroup.form, "ViewFilter", "Form");
const mapOfBundleFormElementStatuses = (!_.isEmpty(rulesFromTheBundle)) ?
rulesFromTheBundle
.map(r => this.runRuleAndSaveFailure(r, entityName, entity, formElementGroup, new Date(), null, null, entityContext))
.map(r => this.runRuleAndSaveFailure(r, entityName, entity, formElementGroup, new Date(), null, entityContext))
.reduce((all, curr) => all.concat(curr), [])
.reduce(this.updateMapUsingKeyPattern(), new Map()) : new Map();
const allFEGFormElements = formElementGroup.getFormElements();
Expand Down

0 comments on commit 71eb8f9

Please sign in to comment.