Skip to content

Commit 74b4156

Browse files
committed
oops
1 parent 5ba3fd6 commit 74b4156

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

src/sentry/workflow_engine/endpoints/serializers.py

+2-3
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,8 @@ def serialize(
148148
user: Any,
149149
**kwargs: Any,
150150
) -> DataConditionHandlerResponse:
151-
if hasattr(kwargs, "condition_type"):
152-
condition_type = kwargs["condition_type"]
153-
else:
151+
condition_type = kwargs.get("condition_type")
152+
if condition_type is None:
154153
raise ValueError("condition_type is required")
155154
result: DataConditionHandlerResponse = {
156155
"type": condition_type,

tests/sentry/workflow_engine/endpoints/test_organization_data_condition_index.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ class TestDetectorTrigger(DataConditionHandler):
4747
group = DataConditionHandler.Group.DETECTOR_TRIGGER
4848
comparison_json_schema = {"type": "boolean"}
4949

50-
# This condition should not be included in the response
50+
# This legacy condition should not be included in the response
5151
@self.registry.register(Condition.EVERY_EVENT)
5252
@dataclass(frozen=True)
5353
class TestIgnoredCondition(DataConditionHandler):

0 commit comments

Comments
 (0)