diff --git a/backend/packages/Upgrade/src/api/DTO/ExperimentDTO.ts b/backend/packages/Upgrade/src/api/DTO/ExperimentDTO.ts index 28a7b36c5f..c7a6e4b778 100644 --- a/backend/packages/Upgrade/src/api/DTO/ExperimentDTO.ts +++ b/backend/packages/Upgrade/src/api/DTO/ExperimentDTO.ts @@ -361,7 +361,7 @@ export class ExperimentDTO { @IsOptional() @IsEnum(ASSIGNMENT_ALGORITHM) - public assignmentAlgorithm: ASSIGNMENT_ALGORITHM; + public assignmentAlgorithm?: ASSIGNMENT_ALGORITHM; // TODO add conditional validity here ie endOn is null @IsOptional() diff --git a/backend/packages/Upgrade/src/api/models/Experiment.ts b/backend/packages/Upgrade/src/api/models/Experiment.ts index 80d18e0f16..2ccfecd5bf 100644 --- a/backend/packages/Upgrade/src/api/models/Experiment.ts +++ b/backend/packages/Upgrade/src/api/models/Experiment.ts @@ -113,6 +113,7 @@ export class Experiment extends BaseModel { @Column({ type: 'enum', enum: ASSIGNMENT_ALGORITHM, + default: ASSIGNMENT_ALGORITHM.RANDOM, }) public assignmentAlgorithm: ASSIGNMENT_ALGORITHM;