Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions detection_rules/cli_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,11 @@ def _convert_type(_val: Any) -> Any:
)

while True:
result = value or input(prompt) or default
result = value if value is not None else input(prompt) or default
if result == "n/a":
result = None

if not result:
if result is None:
if is_required:
value = None
continue
Expand Down Expand Up @@ -318,7 +318,7 @@ def rule_prompt( # noqa: PLR0912, PLR0913, PLR0915
contents[name] = threat_map
continue

if kwargs.get(name):
if name in kwargs:
contents[name] = schema_prompt(name, value=kwargs.pop(name))
continue

Expand Down
Loading
Loading