Removed relations resolution that broke the update

This commit is contained in:
Nicolai Ort 2020-12-09 17:48:24 +01:00
parent 7bb7da4eed
commit e4cb8eba1d
1 changed files with 1 additions and 1 deletions

View File

@ -66,7 +66,7 @@ export class RunnerOrganisationController {
@ResponseSchema(RunnerOrganisationIdsNotMatchingError, { statusCode: 406 })
@OpenAPI({ description: "Update a runnerOrganisation object (id can't be changed)." })
async put(@Param('id') id: number, @EntityFromBody() runnerOrganisation: RunnerOrganisation) {
let oldRunnerOrganisation = await this.runnerOrganisationRepository.findOne({ id: id }, { relations: ['address', 'contact', 'teams'] });
let oldRunnerOrganisation = await this.runnerOrganisationRepository.findOne({ id: id });
if (!oldRunnerOrganisation) {
throw new RunnerOrganisationNotFoundError();