Skip to content

Commit ea8ec90

Browse files
committed
open and save so that
ruff check passes
1 parent 6634a3a commit ea8ec90

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

contentctl/objects/abstract_security_content_objects/detection_abstract.py

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1059,25 +1059,26 @@ def get_summary(
10591059
@model_validator(mode="after")
10601060
def validate_data_source_output_fields(self):
10611061
# Skip validation for Hunting and Correlation types, or non-production detections
1062-
if (self.status != DetectionStatus.production or
1063-
self.type in {AnalyticsType.Hunting, AnalyticsType.Correlation}):
1062+
if self.status != DetectionStatus.production or self.type in {
1063+
AnalyticsType.Hunting,
1064+
AnalyticsType.Correlation,
1065+
}:
10641066
return self
10651067

10661068
# Validate that all required output fields are present in the search
10671069
for data_source in self.data_source_objects:
10681070
if not data_source.output_fields:
10691071
continue
1070-
1072+
10711073
missing_fields = [
1072-
field for field in data_source.output_fields
1073-
if field not in self.search
1074+
field for field in data_source.output_fields if field not in self.search
10741075
]
1075-
1076+
10761077
if missing_fields:
10771078
raise ValueError(
10781079
f"Data source '{data_source.name}' has output fields "
10791080
f"{missing_fields} that are not present in the search "
10801081
f"for detection '{self.name}'"
10811082
)
1082-
1083+
10831084
return self

0 commit comments

Comments
 (0)