}
for (Accountability accountability : accs) {
if (accountability.isActive(when.toYearMonthDay())) {
if (relationFunctionType != null) {
if (accountability.getAccountabilityType() instanceof Function) {
Function function = (Function) accountability.getAccountabilityType();
if (!function.getFunctionType().equals(relationFunctionType)) {
continue;
}
} else {
continue;
}