We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a9004f8 commit df704f3Copy full SHA for df704f3
nightfall/detection_rules.py
@@ -247,7 +247,10 @@ class DetectionRule:
247
"""
248
detectors: List[Detector]
249
logical_op: LogicalOp = LogicalOp.ANY
250
- name: str = ""
+ name: Optional[str] = None
251
252
def as_dict(self):
253
- return {"detectors": [d.as_dict() for d in self.detectors], "logicalOp": self.logical_op.value}
+ result = {"detectors": [d.as_dict() for d in self.detectors], "logicalOp": self.logical_op.value}
254
+ if self.name:
255
+ result["name"] = self.name
256
+ return result
0 commit comments