Fixed the dynamic class creation

This commit is contained in:
2020-12-17 16:26:33 +01:00
parent a8ec0142b0
commit cad30c7f63
2 changed files with 16 additions and 8 deletions

View File

@@ -25,6 +25,7 @@ export class ImportSchoolRunner extends ImportRunner {
newRunner.middlename = this.middlename;
newRunner.lastname = this.lastname;
newRunner.group = (await this.getGroup(orgID)).id;
console.log(newRunner.group)
return newRunner;
}
@@ -44,7 +45,7 @@ export class ImportSchoolRunner extends ImportRunner {
let newRunnerTeam: RunnerTeam = new RunnerTeam();
newRunnerTeam.name = this.class;
newRunnerTeam.parentGroup = org;
team = await getConnectionManager().get().getRepository(RunnerTeam).create(newRunnerTeam);
team = await getConnectionManager().get().getRepository(RunnerTeam).save(newRunnerTeam);
}
return team;