From d207be7ce1e8a2b5a3d18cbbb5c46ecba62a4a24 Mon Sep 17 00:00:00 2001 From: Alejandro Peralta Date: Thu, 5 Dec 2024 10:15:12 +0100 Subject: [PATCH] fix: Make correct abatementPotential type in custom-project.entity.ts --- api/test/utils/stubs/custom-project.stub.ts | 2 +- shared/entities/custom-project.entity.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/api/test/utils/stubs/custom-project.stub.ts b/api/test/utils/stubs/custom-project.stub.ts index 3aeafce5..127aa35a 100644 --- a/api/test/utils/stubs/custom-project.stub.ts +++ b/api/test/utils/stubs/custom-project.stub.ts @@ -5,7 +5,7 @@ import { ECOSYSTEM } from '@shared/entities/ecosystem.enum'; const DEFAULT_CONSERVATION_CUSTOM_PROJECT: CustomProject = { projectName: 'My custom project', - abatementPotential: null, + abatementPotential: undefined, country: { code: 'IND', name: 'India', diff --git a/shared/entities/custom-project.entity.ts b/shared/entities/custom-project.entity.ts index 8679aa50..a4886b49 100644 --- a/shared/entities/custom-project.entity.ts +++ b/shared/entities/custom-project.entity.ts @@ -42,7 +42,7 @@ export class CustomProject { projectLength: number; @Column({ name: "abatement_potential", type: "decimal", nullable: true }) - abatementPotential: number; + abatementPotential?: number; @ManyToOne(() => User, (user) => user.customProjects, { onDelete: "CASCADE" }) @JoinColumn({ name: "user_id" })