Skip to content

Commit 3d5189d

Browse files
committed
feat(aci): add description to detector serializer
1 parent b8a408f commit 3d5189d

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/sentry/workflow_engine/endpoints/serializers/detector_serializer.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ def serialize(self, obj: Detector, attrs: Mapping[str, Any], user, **kwargs) ->
175175
"id": str(obj.id),
176176
"projectId": str(obj.project_id),
177177
"name": obj.name,
178+
"description": obj.description,
178179
"type": obj.type,
179180
"workflowIds": attrs.get("workflow_ids"),
180181
"owner": attrs.get("owner"),

tests/sentry/workflow_engine/endpoints/serializers/test_detector_serializer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ def test_serialize_simple(self) -> None:
3333
"id": str(detector.id),
3434
"projectId": str(detector.project_id),
3535
"name": "Test Detector",
36+
"description": None,
3637
"type": MetricIssue.slug,
3738
"createdBy": None,
3839
"dateCreated": detector.date_added,
@@ -75,6 +76,7 @@ def test_serialize_full(self) -> None:
7576
detector = self.create_detector(
7677
project_id=self.project.id,
7778
name="Test Detector",
79+
description="A full featured detector",
7880
type=MetricIssue.slug,
7981
workflow_condition_group=condition_group,
8082
owner_user_id=self.user.id,
@@ -115,6 +117,7 @@ def test_serialize_full(self) -> None:
115117
"id": str(detector.id),
116118
"projectId": str(detector.project_id),
117119
"name": "Test Detector",
120+
"description": "A full featured detector",
118121
"type": MetricIssue.slug,
119122
"createdBy": str(self.user.id),
120123
"dateCreated": detector.date_added,

0 commit comments

Comments
 (0)