Fix righe collo con Delete in distribuzioneCollo

This commit is contained in:
2025-12-02 15:45:40 +01:00
parent c9658954aa
commit f0e41c6554

View File

@@ -692,6 +692,15 @@ public class DistribuzioneColliService {
List<EntityBase> saveResponse = entityProcessor.processEntityList(entityToSave, skipCommit);
//Rimuovo le righe eliminate dalle liste dei colli salvati
if (saveResponse != null) {
for (EntityBase entity : saveResponse) {
if (entity.getException() != null) throw entity.getException();
if (entity instanceof MtbColt)
((MtbColt) entity).getMtbColr().removeIf(mtbColr -> mtbColr.getOperation() == OperationType.DELETE);
}
}
if (saveResponse != null && !saveResponse.isEmpty()) {
for (EntityBase responseEntity : saveResponse) {