Don't allow players to handle new accounts in exceptional cases
This commit is contained in:
parent
4818936943
commit
de72f119fe
@ -519,14 +519,6 @@ public class ReportManager
|
||||
CompletableFuture<List<Long>> future = _reportRepository.getReportsHandling(accountId);
|
||||
|
||||
return future.thenApply(reportIds -> {
|
||||
// if for some reason we cannot fetch the report a user is handling
|
||||
// assume the worst and return true
|
||||
// this means we do not end up allowing a user to handle multiple reports simultaneously
|
||||
if (reportIds == null)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
for (long reportId : reportIds)
|
||||
{
|
||||
if (isActiveReport(reportId).join())
|
||||
@ -536,7 +528,10 @@ public class ReportManager
|
||||
}
|
||||
|
||||
return false;
|
||||
});
|
||||
}).exceptionally(throwable -> true);
|
||||
// ^ if for some reason we cannot fetch the report a user is handling
|
||||
// assume the worst and return true
|
||||
// this means we do not end up allowing a user to handle multiple reports simultaneously
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -230,7 +230,7 @@ public class ReportRepository
|
||||
future.exceptionally(throwable ->
|
||||
{
|
||||
_logger.log(Level.SEVERE, "Error fetching reports being handled by specified account.", throwable);
|
||||
return new ArrayList<>();
|
||||
return null;
|
||||
});
|
||||
|
||||
return future;
|
||||
|
Loading…
Reference in New Issue
Block a user