Skip to content

Commit e9387f6

Browse files
authored
fix(workflow_engine): Add the name of the workflow to serialized output (#89931)
## Description Looks like the name field was missed in the initialize serializer work. Just adding it in before the demo this afternoon.
1 parent b49d0be commit e9387f6

File tree

2 files changed

+3
-0
lines changed

2 files changed

+3
-0
lines changed

src/sentry/workflow_engine/endpoints/serializers.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ def get_attrs(self, item_list, user, **kwargs) -> MutableMapping[Workflow, dict[
351351
def serialize(self, obj: Workflow, attrs: Mapping[str, Any], user, **kwargs) -> dict[str, Any]:
352352
return {
353353
"id": str(obj.id),
354+
"name": str(obj.name),
354355
"organizationId": str(obj.organization_id),
355356
"dateCreated": obj.date_added,
356357
"dateUpdated": obj.date_updated,

tests/sentry/workflow_engine/endpoints/test_serializers.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,7 @@ def test_serialize_simple(self):
346346

347347
assert result == {
348348
"id": str(workflow.id),
349+
"name": str(workflow.name),
349350
"organizationId": str(self.organization.id),
350351
"config": {},
351352
"dateCreated": workflow.date_added,
@@ -403,6 +404,7 @@ def test_serialize_full(self):
403404

404405
assert result == {
405406
"id": str(workflow.id),
407+
"name": str(workflow.name),
406408
"organizationId": str(self.organization.id),
407409
"config": {},
408410
"dateCreated": workflow.date_added,

0 commit comments

Comments
 (0)