Compare commits

...

2 Commits

Author SHA1 Message Date
1cbe5a1614 🚀Bumped version to v0.4.2
Some checks failed
continuous-integration/drone/push Build is failing
2021-03-29 18:43:29 +02:00
9584bfed8b Fixed faulty object mapping 2021-03-29 18:42:50 +02:00
2 changed files with 15 additions and 2 deletions

View File

@ -1,6 +1,6 @@
{ {
"name": "@odit/lfk-document-server", "name": "@odit/lfk-document-server",
"version": "0.4.1", "version": "0.4.2",
"description": "The document generation server for the LfK! runner system. This generates certificates, sponsoring aggreements and more", "description": "The document generation server for the LfK! runner system. This generates certificates, sponsoring aggreements and more",
"main": "src/app.ts", "main": "src/app.ts",
"scripts": { "scripts": {

View File

@ -71,7 +71,20 @@ export class PdfController {
private mapCardGroupNames(cards: RunnerCard[]): RunnerCard[] { private mapCardGroupNames(cards: RunnerCard[]): RunnerCard[] {
let response = new Array<RunnerCard>(); let response = new Array<RunnerCard>();
for (let card of cards) { for (let card of cards) {
if (!card.runner.group.parentGroup) { if (!card.runner) {
card.runner = {
id: 0,
firstname: "Blank",
lastname: "Blank",
distance: 0,
group: {
id: 0,
name: "Blank",
fullName: "Blank"
}
}
}
else if (!card.runner.group.parentGroup) {
card.runner.group.fullName = card.runner.group.name; card.runner.group.fullName = card.runner.group.name;
} }
else { else {