Fix sql error when a report is closed due to expiration
This commit is contained in:
parent
abea5bbf81
commit
0783f3b693
@ -183,9 +183,12 @@ public class ReportManager
|
||||
OfflinePlayer suspect = Bukkit.getOfflinePlayer(suspectUUID);
|
||||
String suspectName = suspect.getName();
|
||||
|
||||
int closerId = reportCloser != null ? _clientManager.Get(reportCloser).getAccountId() : -1;
|
||||
if (reportCloser != null)
|
||||
{
|
||||
int closerId = _clientManager.Get(reportCloser).getAccountId();
|
||||
report.setHandlerId(closerId);
|
||||
}
|
||||
|
||||
report.setHandlerId(closerId);
|
||||
report.setReportResult(reportResult);
|
||||
_reportRepository.updateReport(report).thenAccept(reportId ->
|
||||
{
|
||||
@ -311,6 +314,7 @@ public class ReportManager
|
||||
|
||||
if (priority <= 0)
|
||||
{
|
||||
System.out.println("Closing report due to expiration");
|
||||
closeReport(report, null, new ReportResult(ReportResultType.EXPIRED, null));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user