From 16645f61184413b3411cca6ac3b8d8d63e7edb53 Mon Sep 17 00:00:00 2001 From: andrea rota Date: Tue, 23 Apr 2024 12:55:42 +0100 Subject: [PATCH] apply source formatting --- ...re-amounts-per-planning-unit.repository.ts | 26 ++++++++++--------- 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/api/libs/feature-amounts-per-planning-unit/src/repository/typeorm-feature-amounts-per-planning-unit.repository.ts b/api/libs/feature-amounts-per-planning-unit/src/repository/typeorm-feature-amounts-per-planning-unit.repository.ts index 253f906855..afc942b97a 100644 --- a/api/libs/feature-amounts-per-planning-unit/src/repository/typeorm-feature-amounts-per-planning-unit.repository.ts +++ b/api/libs/feature-amounts-per-planning-unit/src/repository/typeorm-feature-amounts-per-planning-unit.repository.ts @@ -32,18 +32,20 @@ export class TypeormFeatureAmountsPerPlanningUnitRepository projectId: string, featureIds: string[], ): Promise { - return this.geoEntityManager - .createQueryBuilder() - .select('amount') - .addSelect('project_pu_id', 'projectPuId') - .addSelect('feature_id', 'featureId') - .from(FeatureAmountsPerPlanningUnitEntity, 'fappu') - .where('project_id = :projectId', { projectId }) - .andWhere('feature_id IN (:...featureIds)', { featureIds }) - /** The Marxan solver will show unexpected behaviour when seeing - * puvspr.dat rows with amount = 0 */ - .andWhere('amount > 0') - .execute(); + return ( + this.geoEntityManager + .createQueryBuilder() + .select('amount') + .addSelect('project_pu_id', 'projectPuId') + .addSelect('feature_id', 'featureId') + .from(FeatureAmountsPerPlanningUnitEntity, 'fappu') + .where('project_id = :projectId', { projectId }) + .andWhere('feature_id IN (:...featureIds)', { featureIds }) + /** The Marxan solver will show unexpected behaviour when seeing + * puvspr.dat rows with amount = 0 */ + .andWhere('amount > 0') + .execute() + ); } public async saveAmountPerPlanningUnitAndFeature(