Part 1 of the relation fix

This commit is contained in:
2020-12-04 21:18:44 +01:00
parent 056413560e
commit c53e94d205
5 changed files with 14 additions and 13 deletions

View File

@@ -72,7 +72,7 @@ export class ResponseRunner {
this.lastname = runner.lastname;
this.phone = runner.phone;
this.email = runner.email;
this.distance = runner.distance;
this.distance = runner.scans.reduce((sum, current) => sum + current.distance, 0);
this.group = runner.group;
}
}