mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-16 14:11:50 +00:00
Fix logic error in case creation for manual kicks
This commit is contained in:
parent
14bebfe405
commit
a60cb92b74
1 changed files with 3 additions and 4 deletions
|
@ -28,11 +28,10 @@ export const CreateKickCaseOnManualKickEvt = modActionsEvt(
|
||||||
);
|
);
|
||||||
|
|
||||||
if (kickAuditLogEntry) {
|
if (kickAuditLogEntry) {
|
||||||
const existingCaseForThisEntry = await pluginData.state.cases.findByAuditLogId(kickAuditLogEntry.id);
|
let createdCase = await pluginData.state.cases.findByAuditLogId(kickAuditLogEntry.id);
|
||||||
let createdCase;
|
if (createdCase) {
|
||||||
if (existingCaseForThisEntry) {
|
|
||||||
logger.warn(
|
logger.warn(
|
||||||
`Tried to create duplicate case for audit log entry ${kickAuditLogEntry.id}, existing case id ${existingCaseForThisEntry.id}`,
|
`Tried to create duplicate case for audit log entry ${kickAuditLogEntry.id}, existing case id ${createdCase.id}`,
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
const casesPlugin = pluginData.getPlugin(CasesPlugin);
|
const casesPlugin = pluginData.getPlugin(CasesPlugin);
|
||||||
|
|
Loading…
Add table
Reference in a new issue