Skip to content

Commit

Permalink
fix: condition to check eligible headers [DHIS2-16191]
Browse files Browse the repository at this point in the history
  • Loading branch information
gnespolino committed Dec 28, 2023
1 parent 9f2710d commit ed70c9b
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -191,16 +191,14 @@ private static Stream<DimensionIdentifier<DimensionParam>> getEligibleParsedHead

/**
* Checks if the given {@link DimensionIdentifier} is eligible to be added as a header. It is
* eligible if it is a static dimension and it is either an event or enrollment dimension, and it
* is not a TEI static field (which is already added to the grid headers).
* eligible if it is a static dimension and it is either an event or enrollment dimension.
*
* @param parsedHeader the {@link DimensionIdentifier}.
* @return true if it is eligible, false otherwise.
*/
private static boolean isEligible(DimensionIdentifier<DimensionParam> parsedHeader) {
return parsedHeader.getDimension().isStaticDimension()
&& (parsedHeader.isEventDimension() || parsedHeader.isEnrollmentDimension())
&& !parsedHeader.getDimension().getStaticDimension().isTeiStaticField();
&& (parsedHeader.isEventDimension() || parsedHeader.isEnrollmentDimension());
}

/**
Expand Down

0 comments on commit ed70c9b

Please sign in to comment.