mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-11-11 21:33:09 +00:00
added missing replication for registrationSecret, when loading regattas
generate an initial registrationSecret and store it
This commit is contained in:
1 parent
756ede8f92
commit
badeec7e2b
1 file changed
+9
-3
+9
-3
@@ -1046,8 +1046,13 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
LockUtil.lockForWrite(regattasByNameLock);
|
||||
try {
|
||||
for (Regatta regatta : domainObjectFactory.loadAllRegattas(this)) {
|
||||
logger.info("putting regatta " + regatta.getName() + " (" + regatta.hashCode()
|
||||
+ ") into regattasByName");
|
||||
logger.info(
|
||||
"putting regatta " + regatta.getName() + " (" + regatta.hashCode() + ") into regattasByName");
|
||||
if (regatta.getRegistrationLinkSecret() == null) {
|
||||
logger.info("Added missing RegistrationLinkSecret to " + regatta + " and stored to database");
|
||||
regatta.setRegistrationLinkSecret(UUID.randomUUID().toString());
|
||||
mongoObjectFactory.storeRegatta(regatta);
|
||||
}
|
||||
regattasByName.put(regatta.getName(), regatta);
|
||||
regatta.addRegattaListener(this);
|
||||
onRegattaLikeAdded(regatta);
|
||||
@@ -1847,7 +1852,8 @@ public class RacingEventServiceImpl implements RacingEventService, ClearStateTes
|
||||
replicate(new AddSpecificRegatta(regatta.getName(),
|
||||
regatta.getBoatClass() == null ? null : regatta.getBoatClass().getName(),
|
||||
regatta.canBoatsOfCompetitorsChangePerRace(), regatta.getCompetitorRegistrationType(),
|
||||
/* registrationLinkSecret */ null, regatta.getStartDate(), regatta.getEndDate(), regatta.getId(),
|
||||
/* registrationLinkSecret */ regatta.getRegistrationLinkSecret(), regatta.getStartDate(),
|
||||
regatta.getEndDate(), regatta.getId(),
|
||||
getSeriesWithoutRaceColumnsConstructionParametersAsMap(regatta), regatta.isPersistent(),
|
||||
regatta.getScoringScheme(), courseAreaId, regatta.getBuoyZoneRadiusInHullLengths(),
|
||||
regatta.useStartTimeInference(), regatta.isControlTrackingFromStartAndFinishTimes(),
|
||||
|
||||
Reference in new issue
Block a user