don't assign additional marks to race if TracTrac doesn't know the course area

Change-Id: I7a38ee8c5eab49aea0f8819f1067e255dbda8cd3
This commit is contained in:
Axel Uhl committed 2017-04-07 15:39:06 +02:00
1 parent ee8e2d6bc0
commit 2d5651ac44
1 file changed
+7 -5
@@ -575,11 +575,13 @@ public class DomainFactoryImpl implements DomainFactory {
@Override
public Iterable<IControl> getControlsForCourseArea(IEvent tracTracEvent, String tracTracCourseAreaName) {
final Set<IControl> result = new HashSet<>();
for (final IControl control : tracTracEvent.getControls()) {
if (Util.equalsWithNull(control.getCourseArea(), tracTracCourseAreaName)) {
result.add(control);
}
}
if (tracTracCourseAreaName != null) {
for (final IControl control : tracTracEvent.getControls()) {
if (control.getCourseArea() != null && control.getCourseArea().equals(tracTracCourseAreaName)) {
result.add(control);
}
}
}
return result;
}