Skip to content

Commit

Permalink
chore(dynamic alert thresholds) Make project id optional for delete e… (
Browse files Browse the repository at this point in the history
#1174)

…nd point
  • Loading branch information
ram-senth committed Sep 18, 2024
1 parent 7e82ad6 commit aa9508f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/seer/anomaly_detection/models/external.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ class StoreDataResponse(BaseModel):

class DeleteAlertDataRequest(BaseModel):
organization_id: int
project_id: int
project_id: Optional[int] = Field(None)
alert: AlertInSeer


Expand Down
3 changes: 2 additions & 1 deletion src/seer/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,8 @@ def delete_alert__data_endpoint(
data: DeleteAlertDataRequest,
) -> DeleteAlertDataResponse:
sentry_sdk.set_tag("organization_id", data.organization_id)
sentry_sdk.set_tag("project_id", data.project_id)
if data.project_id is not None:
sentry_sdk.set_tag("project_id", data.project_id)
sentry_sdk.set_tag("alert_id", data.alert.id)
try:
response = anomaly_detection().delete_alert_data(data)
Expand Down

0 comments on commit aa9508f

Please sign in to comment.