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

Commits:

1 changed file:

Changes:

  • t3-actions/src/main/java/fr/ird/t3/actions/data/level3/Level3Action.java
    ... ... @@ -324,12 +324,13 @@ public class Level3Action extends T3Action<Level3Configuration> {
    324 324
                 addInfoMessage(message);
    
    325 325
                 Map<Species, LengthCompositionAggregateModel> compositionModels = sampleStratum.getCompositionModel();
    
    326 326
                 // get all species found in catches
    
    327
    -            Set<Species> catchSpecies = new HashSet<>(ActivityTopiaDao.getSpecies(activity.getCorrectedElementaryCatch()));
    
    327
    +            Collection<CorrectedElementaryCatch> correctedElementaryCatch = catchStratum.getCorrectedElementaryCatch(activity);
    
    328
    +            Set<Species> catchSpecies = new HashSet<>(ActivityTopiaDao.getSpecies(correctedElementaryCatch));
    
    328 329
                 // and keep only the one to fix
    
    329 330
                 catchSpecies.retainAll(inputContext.getSpecies());
    
    330 331
                 // compute a linear representation of corrected catches (by species and weight category)
    
    331 332
                 Map<String, CorrectedElementaryCatch> linearCorrectedCatches = new TreeMap<>();
    
    332
    -            for (CorrectedElementaryCatch aCatch : activity.getCorrectedElementaryCatch()) {
    
    333
    +            for (CorrectedElementaryCatch aCatch : correctedElementaryCatch) {
    
    333 334
                     String key = aCatch.getWeightCategoryTreatment().getTopiaId() + aCatch.getSpecies().getTopiaId();
    
    334 335
                     linearCorrectedCatches.put(key, aCatch);
    
    335 336
                 }