File tree 2 files changed +3
-4
lines changed
src/sentry/workflow_engine/endpoints
tests/sentry/workflow_engine/endpoints
2 files changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -148,9 +148,8 @@ def serialize(
148
148
user : Any ,
149
149
** kwargs : Any ,
150
150
) -> 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 :
154
153
raise ValueError ("condition_type is required" )
155
154
result : DataConditionHandlerResponse = {
156
155
"type" : condition_type ,
Original file line number Diff line number Diff line change @@ -47,7 +47,7 @@ class TestDetectorTrigger(DataConditionHandler):
47
47
group = DataConditionHandler .Group .DETECTOR_TRIGGER
48
48
comparison_json_schema = {"type" : "boolean" }
49
49
50
- # This condition should not be included in the response
50
+ # This legacy condition should not be included in the response
51
51
@self .registry .register (Condition .EVERY_EVENT )
52
52
@dataclass (frozen = True )
53
53
class TestIgnoredCondition (DataConditionHandler ):
You can’t perform that action at this time.
0 commit comments