This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository tutti. See https://gitlab.nuiton.org/codelutin/tutti.git commit efe729c272e3af40b3ca53f0e86d22afcee2534e Author: Tony CHEMIT <chemit@codelutin.com> Date: Wed Apr 20 07:48:39 2016 +0200 Ne pas tenter de supprimer des lots déjà supprimés (See #8261) --- .../catches/species/edit/actions/RemoveSpeciesBatchAction.java | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/edit/actions/RemoveSpeciesBatchAction.java b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/edit/actions/RemoveSpeciesBatchAction.java index 1ede3c8..d53a6da 100644 --- a/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/edit/actions/RemoveSpeciesBatchAction.java +++ b/tutti-ui-swing/src/main/java/fr/ifremer/tutti/ui/swing/content/operation/catches/species/edit/actions/RemoveSpeciesBatchAction.java @@ -39,7 +39,6 @@ import org.jdesktop.swingx.JXTable; import javax.swing.JOptionPane; import java.util.HashSet; -import java.util.LinkedHashSet; import java.util.Set; import static org.nuiton.i18n.I18n.t; @@ -111,8 +110,6 @@ public class RemoveSpeciesBatchAction extends LongActionSupport<SpeciesBatchUIMo rowToRemove = new HashSet<>(); - Set<Integer> removedBatchId = new LinkedHashSet<>(); - for (int rowIndex : selectedRowIndexes) { SpeciesBatchRowModel selectedBatch = tableModel.getEntry(rowIndex); @@ -121,7 +118,7 @@ public class RemoveSpeciesBatchAction extends LongActionSupport<SpeciesBatchUIMo Integer selectedBatchId = selectedBatch.getIdAsInt(); boolean batchRoot = selectedBatch.isBatchRoot(); - if (!batchRoot && removedBatchId.contains(selectedBatch.getParentBatch().getIdAsInt())) { + if (!batchRoot && rowToRemove.contains(selectedBatch)) { // This batch was already removed if (log.isInfoEnabled()) { @@ -133,11 +130,8 @@ public class RemoveSpeciesBatchAction extends LongActionSupport<SpeciesBatchUIMo if (log.isInfoEnabled()) { log.info("Delete species batch: " + selectedBatchId); } - removedBatchId.add(selectedBatchId); // remove selected batch and all his children - - // remove parent batch (will destroy all his childs from db) persistenceService.deleteSpeciesBatch(selectedBatchId); -- To stop receiving notification emails like this one, please contact codelutin.com SCM administrator <admin+scm@codelutin.com>.