Tony CHEMIT pushed to branch develop at ultreiaio / ird-observe Commits: 89d60b77 by Tony Chemit at 2021-01-04T13:35:04+01:00 Erreur sur création de marée LL - Closes #1728 - - - - - 1 changed file: - models/persistence/src/main/java/fr/ird/observe/entities/data/ll/common/TripImpl.java Changes: ===================================== models/persistence/src/main/java/fr/ird/observe/entities/data/ll/common/TripImpl.java ===================================== @@ -52,20 +52,24 @@ public class TripImpl extends TripAbstract { int logbookFishingOperationCount = 0; int associatedActivityCount = 0; int associatedFishingOperationCount = 0; - for (fr.ird.observe.entities.data.ll.observation.Activity a : getActivityObs()) { - if (a.isSetOperation()) { - observationsFishingOperationCount++; + if (isActivityObsNotEmpty()) { + for (fr.ird.observe.entities.data.ll.observation.Activity a : getActivityObs()) { + if (a.isSetOperation()) { + observationsFishingOperationCount++; + } } } - for (fr.ird.observe.entities.data.ll.logbook.Activity a : getActivityLogbook()) { - boolean withRelated = a.getRelatedObservedActivity() != null; - if (withRelated) { - associatedActivityCount++; - } - if (a.isSetOperation()) { - logbookFishingOperationCount++; + if (isActivityLogbookNotEmpty()) { + for (fr.ird.observe.entities.data.ll.logbook.Activity a : getActivityLogbook()) { + boolean withRelated = a.getRelatedObservedActivity() != null; if (withRelated) { - associatedFishingOperationCount++; + associatedActivityCount++; + } + if (a.isSetOperation()) { + logbookFishingOperationCount++; + if (withRelated) { + associatedFishingOperationCount++; + } } } } View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/89d60b7757d97c18e4817fd091... -- View it on GitLab: https://gitlab.com/ultreiaio/ird-observe/-/commit/89d60b7757d97c18e4817fd091... You're receiving this email because of your account on gitlab.com.