mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-11 14:50:56 +00:00
Fixed possible NPE in data importer
This commit is contained in:
1 parent
ecc499981d
commit
c18823acfe
1 file changed
+5
-1
+5
-1
@@ -987,7 +987,11 @@ public class RacingEventServiceImpl implements RacingEventServiceWithTestSupport
|
||||
|
||||
@Override
|
||||
public void addRegattaWithoutReplication(Regatta regatta) {
|
||||
boolean wasAdded = addAndConnectRegatta(regatta.isPersistent(), regatta.getDefaultCourseArea().getId(), regatta);
|
||||
UUID defaultCourseAreaId = null;
|
||||
if (regatta.getDefaultCourseArea() != null) {
|
||||
defaultCourseAreaId = regatta.getDefaultCourseArea().getId();
|
||||
}
|
||||
boolean wasAdded = addAndConnectRegatta(regatta.isPersistent(), defaultCourseAreaId, regatta);
|
||||
if (!wasAdded) {
|
||||
logger.info("Regatta with name " + regatta.getName() + " already existed, so it hasn't been added.");
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user