Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 8b41a191 by Tony Chemit at 2023-01-03T14:29:58+01:00 Lors de la suppression gloable d'une capture utilisée sur le formulaire espèces sensibles, la demande de confirmation n'est pas proposée (mais elle l'est bien si l'espèce est utilisée dans un échantillon) - Closes #2580 - - - - - 2 changed files: - core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/observation/SetCatchDto.java - core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/observation/SetCatchSpi.java Changes: ===================================== core/api/dto/src/main/java/fr/ird/observe/dto/data/ps/observation/SetCatchDto.java ===================================== @@ -53,7 +53,7 @@ public class SetCatchDto extends GeneratedSetCatchDto { * @return set of unsafe species used in catches */ public Set<SpeciesReference> getUnsafeSpecies() { - return getCatches().stream().filter(CatchDto::isHasSample).map(CatchDto::getSpecies).collect(Collectors.toSet()); + return getCatches().stream().filter(c -> c.isHasSample() || c.isHasRelease()).map(CatchDto::getSpecies).collect(Collectors.toSet()); } /** ===================================== core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/observation/SetCatchSpi.java ===================================== @@ -48,7 +48,7 @@ public class SetCatchSpi extends GeneratedSetCatchSpi { childDto.setHasSample(hasSample); }); } - // on cherche si il y a des libérations d'espèce sensibles + // is there some non target catch release? if (entity.isNonTargetCatchReleaseNotEmpty()) { // get usable species ids java.util.Set<String> speciesId = ToolkitId.ids(entity.getNonTargetCatchRelease().stream().map(NonTargetCatchRelease::getSpecies)); View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/8b41a19189b06da580e06945c8... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/8b41a19189b06da580e06945c8... You're receiving this email because of your account on gitlab.com.
participants (1)
-
Tony CHEMIT (@tchemit)