Skip to content

Commit

Permalink
fix get country query
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeh committed Dec 12, 2024
1 parent 9157582 commit c7ad48b
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions api/src/modules/calculations/data.repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,9 @@ export class DataRepository extends Repository<BaseDataView> {
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,
Expand Down

0 comments on commit c7ad48b

Please sign in to comment.