Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

345 failed to invoke alert after latest upgrade #346

Merged
merged 8 commits into from
Dec 3, 2024
7 changes: 6 additions & 1 deletion backend/app/incidents/services/incident_alert.py
Original file line number Diff line number Diff line change
Expand Up @@ -846,7 +846,12 @@ async def create_alert(
existing_alert,
)
await add_asset_to_copilot_alert(alert_payload, existing_alert, customer_code, session)
await add_ioc_to_copilot_alert(alert_payload, existing_alert, customer_code, session)
# If the alert has an IoC, add it to the alert
if alert_payload.ioc_payload is not None:
logger.info(f"Adding IoC to alert {existing_alert}")
await add_ioc_to_copilot_alert(alert_payload, existing_alert, customer_code, session)
else:
logger.info(f"No IoC found for alert {existing_alert}")
return existing_alert
return await create_alert_full(alert_payload, customer_code, session)

Expand Down
Loading