diff --git a/src/datasources/db/utils.ts b/src/datasources/db/utils.ts index fb9c815..366ad83 100644 --- a/src/datasources/db/utils.ts +++ b/src/datasources/db/utils.ts @@ -173,7 +173,7 @@ export class ActionLogger { } const ret :string[] = []; Object.keys(updates).forEach(value => { - if (typeof updates[value] === 'object' && !Array.isArray(updates[value])) { + if (typeof updates[value] === 'object' && !Array.isArray(updates[value]) && updates[value]) { Object.keys(updates[value]).forEach(subValue => { ret.push(alias + '."' + value + subValue[0].toUpperCase() + subValue.substr(1).toLowerCase() + '"'); }); diff --git a/src/model/CargoBike.ts b/src/model/CargoBike.ts index 7518945..70aae31 100644 --- a/src/model/CargoBike.ts +++ b/src/model/CargoBike.ts @@ -32,12 +32,12 @@ export enum Group { } export enum StickerBikeNameState { - OK, - IMPROVE, - PRODUCED, - NONEED, - MISSING, - UNKNOWN + OK = 'OK', + IMPROVE = 'IMPROVE', + PRODUCED = 'PRODUCED', + NONEED = 'NONEED', + MISSING = 'MISSING', + UNKNOWN = 'UNKNOWN' } export interface Lockable { diff --git a/src/model/InsuranceData.ts b/src/model/InsuranceData.ts index f4c86a0..5e134bb 100644 --- a/src/model/InsuranceData.ts +++ b/src/model/InsuranceData.ts @@ -43,5 +43,5 @@ export class InsuranceData { @Column({ nullable: true }) - note: string; + notes: string; } diff --git a/src/model/Taxes.ts b/src/model/Taxes.ts index 1c973ca..31523d4 100644 --- a/src/model/Taxes.ts +++ b/src/model/Taxes.ts @@ -1,7 +1,7 @@ /* eslint no-unused-vars: "off" */ import { Column } from 'typeorm'; -export enum OrganizationArea { +export enum OrganisationArea { IB = 'IB', ZB = 'ZB' } @@ -11,8 +11,8 @@ export class Taxes { @Column({ type: 'enum', - enum: OrganizationArea, + enum: OrganisationArea, nullable: true }) - organizationArea: OrganizationArea; + organisationArea: OrganisationArea; }