Skip to content

Commit fd80a66

Browse files
committed
grab the right field
1 parent 7a3c91f commit fd80a66

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

contentctl/actions/new_content.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ def buildDetection(self)->dict[str,Any]:
2828
answers['status'] = "production" #start everything as production since that's what we INTEND the content to become
2929
answers['description'] = 'UPDATE_DESCRIPTION'
3030
file_name = answers['name'].replace(' ', '_').replace('-','_').replace('.','_').replace('/','_').lower()
31+
answers['kind'] = answers['detection_kind']
3132
answers['search'] = answers['detection_search'] + ' | `' + file_name + '_filter`'
3233
answers['how_to_implement'] = 'UPDATE_HOW_TO_IMPLEMENT'
3334
answers['known_false_positives'] = 'UPDATE_KNOWN_FALSE_POSITIVES'
@@ -84,7 +85,7 @@ def buildStory(self)->dict[str,Any]:
8485
def execute(self, input_dto: new) -> None:
8586
if input_dto.type == NewContentType.detection:
8687
content_dict = self.buildDetection()
87-
subdirectory = pathlib.Path('detections') / content_dict.get('type')
88+
subdirectory = pathlib.Path('detections') / content_dict.get('detection_kind')
8889
elif input_dto.type == NewContentType.story:
8990
content_dict = self.buildStory()
9091
subdirectory = pathlib.Path('stories')

0 commit comments

Comments
 (0)