Skip to content

Commit a6bf103

Browse files
committed
'fix' mypy by ignorning it. We should eventually get this consistent and use the data conditions to store the grouping rules.
1 parent 354cd53 commit a6bf103

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

src/sentry/workflow_engine/endpoints/validators/error_detector.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@
1616
class ErrorDetectorValidator(BaseDetectorTypeValidator):
1717
data_source_required = False
1818

19+
# TODO - Update the Error Detector to store grouping rules in the DataCondition
1920
condition_group = serializers.DictField(
20-
required=False
21-
) # This is only used to validate that it's empty
21+
required=False,
22+
allow_null=True,
23+
) # type: ignore[assignment] # Intentionally overrides nested serializer to accept empty dicts
2224

2325
fingerprinting_rules = serializers.CharField(required=False, allow_blank=True, allow_null=True)
2426

@@ -41,11 +43,7 @@ def validate_condition_group(self, value: Any) -> Any:
4143
"Condition group is not supported for error detectors"
4244
)
4345

44-
if value is not None:
45-
# We want to allow an empty DataConditionGroup, but not create anything.
46-
return None
47-
48-
return value
46+
return None
4947

5048
def validate_name(self, value: Any) -> str:
5149
# if name is different from existing, raise an error

0 commit comments

Comments
 (0)