From c7ad48b50c99b9d542a5a7b0fdb9efb06594e46c Mon Sep 17 00:00:00 2001 From: alexeh Date: Thu, 12 Dec 2024 06:39:28 +0100 Subject: [PATCH] fix get country query --- api/src/modules/calculations/data.repository.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/api/src/modules/calculations/data.repository.ts b/api/src/modules/calculations/data.repository.ts index e3b155e8..2f321a9f 100644 --- a/api/src/modules/calculations/data.repository.ts +++ b/api/src/modules/calculations/data.repository.ts @@ -82,11 +82,9 @@ export class DataRepository extends Repository { activity, ); - const country = await this.repo - .createQueryBuilder('country') - .from(Country, 'country') - .where('country.code = :code', { code: countryCode }) - .getOne(); + const country = await this.manager + .getRepository(Country) + .findOne({ where: { code: countryCode } }); return { additionalBaseData,