Skip to content

Commit

Permalink
feat: ✨ mocksEngine: add ability to skip adding events to generate …
Browse files Browse the repository at this point in the history
…inferred teams only
  • Loading branch information
CourtHive committed Apr 21, 2024
1 parent 8b00497 commit 7a16408
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions src/assemblies/generators/mocks/generateTournamentRecord.ts
Original file line number Diff line number Diff line change
Expand Up @@ -202,16 +202,18 @@ function processDrawProfiles(params) {

const { drawId, eventId, event, uniqueParticipantIds } = result;

result = addEvent({
suppressNotifications: false,
internalUse: true,
tournamentRecord,
event,
});
if (result.error) return result;
if (drawProfile?.addEvent !== false) {
result = addEvent({
suppressNotifications: false,
internalUse: true,
tournamentRecord,
event,
});
if (result.error) return result;

if (drawId) drawIds.push(drawId);
eventIds.push(eventId);
if (drawId) drawIds.push(drawId);
eventIds.push(eventId);
}

if (uniqueParticipantIds?.length) allUniqueParticipantIds.push(...uniqueParticipantIds);

Expand Down

0 comments on commit 7a16408

Please sign in to comment.