Remove handler from report object when aborting a report

This commit is contained in:
Keir Nellyer 2016-08-19 14:29:15 +01:00
parent 24d4da6aa2
commit 10a6cbfe3b

View File

@ -1,16 +1,12 @@
package mineplex.core.report;
import java.util.Collection;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.UUID;
import java.util.concurrent.CompletableFuture;
import java.util.function.BiConsumer;
import java.util.function.Function;
import java.util.logging.Level;
import java.util.stream.Collectors;
@ -22,8 +18,6 @@ import org.bukkit.plugin.java.JavaPlugin;
import com.google.common.collect.HashMultimap;
import com.google.common.collect.Multimap;
import com.google.common.collect.Ordering;
import com.google.common.collect.TreeMultimap;
import mineplex.core.account.CoreClientManager;
import mineplex.core.chatsnap.SnapshotManager;
import mineplex.core.chatsnap.command.PushSnapshotsCommand;
@ -335,6 +329,7 @@ public class ReportManager
{
long reportId = report.getId().orElseThrow(() -> new IllegalStateException("Report id must be present."));
int handlerId = report.getHandlerId().orElseThrow(() -> new IllegalStateException("Handler must be assigned to report."));
report.setHandlerId(null);
return _reportRepository.setAborted(reportId, handlerId, aborted);
}