Skip to content

Commit

Permalink
fix(ProtectedAreas): Removes unnecessary code on listForProject metho…
Browse files Browse the repository at this point in the history
…d that would fail on deletions
  • Loading branch information
KevSanchez authored and hotzevzl committed Oct 27, 2023
1 parent 0ba7e0a commit 7ee9ccc
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
} from '@nestjs/common';
import { InjectRepository } from '@nestjs/typeorm';
import { AppInfoDTO } from '@marxan-api/dto/info.dto';
import { Brackets, IsNull, Not, Repository, SelectQueryBuilder } from 'typeorm';
import { IsNull, Not, Repository, SelectQueryBuilder } from 'typeorm';
import { CreateProtectedAreaDTO } from './dto/create.protected-area.dto';
import { UpdateProtectedAreaDTO } from './dto/update.protected-area.dto';
import { ProtectedArea } from '@marxan/protected-areas';
Expand All @@ -30,7 +30,7 @@ import { AppConfig } from '@marxan-api/utils/config.utils';
import { IUCNCategory } from '@marxan/iucn';
import { isDefined } from '@marxan/utils';
import { Scenario } from '../scenarios/scenario.api.entity';
import { groupBy, intersection, isArray } from 'lodash';
import { groupBy } from 'lodash';
import { ProjectSnapshot } from '@marxan/projects';
import { SelectionGetService } from '@marxan-api/modules/scenarios/protected-area/getter/selection-get.service';
import { Either, left, right } from 'fp-ts/Either';
Expand Down Expand Up @@ -321,8 +321,6 @@ export class ProtectedAreasCrudService extends AppBaseService<
* number of scenarios where each protected area is used.
*/

info!.params.project = project;

let projectProtectedAreas =
await this.selectionGetService.getForProject(project);

Expand Down

1 comment on commit 7ee9ccc

@vercel
Copy link

@vercel vercel bot commented on 7ee9ccc Oct 27, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

marxan – ./

marxan-vizzuality1.vercel.app
marxan-git-develop-vizzuality1.vercel.app
marxan23.vercel.app

Please sign in to comment.