Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe

Commits:

2 changed files:

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 {
    53 53
          * @return set of unsafe species used in catches
    
    54 54
          */
    
    55 55
         public Set<SpeciesReference> getUnsafeSpecies() {
    
    56
    -        return getCatches().stream().filter(CatchDto::isHasSample).map(CatchDto::getSpecies).collect(Collectors.toSet());
    
    56
    +        return getCatches().stream().filter(c -> c.isHasSample() || c.isHasRelease()).map(CatchDto::getSpecies).collect(Collectors.toSet());
    
    57 57
         }
    
    58 58
     
    
    59 59
         /**
    

  • core/persistence/java/src/main/java/fr/ird/observe/entities/data/ps/observation/SetCatchSpi.java
    ... ... @@ -48,7 +48,7 @@ public class SetCatchSpi extends GeneratedSetCatchSpi {
    48 48
                     childDto.setHasSample(hasSample);
    
    49 49
                 });
    
    50 50
             }
    
    51
    -        // on cherche si il y a des libérations d'espèce sensibles
    
    51
    +        // is there some non target catch release?
    
    52 52
             if (entity.isNonTargetCatchReleaseNotEmpty()) {
    
    53 53
                 // get usable species ids
    
    54 54
                 java.util.Set<String> speciesId = ToolkitId.ids(entity.getNonTargetCatchRelease().stream().map(NonTargetCatchRelease::getSpecies));