Fix checking deleted schematic limbo
This commit is contained in:
@@ -272,12 +272,13 @@ public class CheckCommand extends SWCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private boolean concludeCheckSession(String reason, SchematicType type) {
|
private boolean concludeCheckSession(String reason, SchematicType type) {
|
||||||
if(SchematicNode.getSchematicNode(schematic.getId()) == null) // Schematic was deleted
|
boolean exists = SchematicNode.getSchematicNode(schematic.getId()) != null;
|
||||||
return false;
|
|
||||||
|
|
||||||
CheckedSchematic.create(schematic, checker.user().getId(), startTime, Timestamp.from(Instant.now()), reason);
|
if(exists) {
|
||||||
if(type != null)
|
CheckedSchematic.create(schematic, checker.user().getId(), startTime, Timestamp.from(Instant.now()), reason);
|
||||||
schematic.setSchemtype(type);
|
if(type != null)
|
||||||
|
schematic.setSchemtype(type);
|
||||||
|
}
|
||||||
|
|
||||||
remove();
|
remove();
|
||||||
VelocityCore.schedule(() -> {
|
VelocityCore.schedule(() -> {
|
||||||
@@ -285,7 +286,7 @@ public class CheckCommand extends SWCommand {
|
|||||||
if(subserver != null)
|
if(subserver != null)
|
||||||
subserver.stop();
|
subserver.stop();
|
||||||
}).schedule();
|
}).schedule();
|
||||||
return true;
|
return exists;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void remove() {
|
private void remove() {
|
||||||
|
|||||||
Reference in New Issue
Block a user