Skip to content

Commit

Permalink
fix: Remove unnecessary calls to the DB during DataValueSet import [D…
Browse files Browse the repository at this point in the history
…HIS2-16159]
  • Loading branch information
david-mackessy committed Nov 14, 2023
1 parent bc2befc commit cbf9d3f
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -645,8 +645,7 @@ private void checkDataValueOrgUnitValidForAttrOptionCombo(

private boolean isOrgUnitValidForAttrOptionCombo(DataValueContext valueContext) {
Set<OrganisationUnit> aocOrgUnits = valueContext.getAttrOptionCombo().getOrganisationUnits();
return aocOrgUnits == null
|| organisationUnitService.isDescendant(valueContext.getOrgUnit(), aocOrgUnits);
return aocOrgUnits == null || valueContext.getOrgUnit().isDescendant(aocOrgUnits);
}

private static void checkDataValueTargetDataSets(
Expand Down

0 comments on commit cbf9d3f

Please sign in to comment.