Skip to content

Commit 7e9195a

Browse files
committed
fix missing required parameter output_overwrite fixes #138
1 parent bab7c82 commit 7e9195a

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

data_source_mapping.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -523,17 +523,18 @@ def _add_visibility_object_to_dict(dict_vis_objects, tech_id, vis_obj):
523523
return dict_vis_objects
524524

525525

526-
def update_technique_administration_file(file_data_sources, file_tech_admin):
526+
def update_technique_administration_file(file_data_sources, file_tech_admin, output_overwrite):
527527
"""
528528
Update the visibility scores in the provided technique administration file
529529
:param file_data_sources: file location of the data source admin. file
530530
:param file_tech_admin: file location of the tech. admin. file
531+
:param output_overwrite: boolean flag indicating whether we're in overwrite mode
531532
:return:
532533
"""
533534
file_updated = False
534535

535536
# first we generate the new visibility scores contained within a temporary tech. admin YAML 'file'
536-
new_visibility_scores = generate_technique_administration_file(file_data_sources, None, write_file=False, all_techniques=True)
537+
new_visibility_scores = generate_technique_administration_file(file_data_sources, None, output_overwrite, write_file=False, all_techniques=True)
537538

538539
# we get the date to remove the single quotes from the date at the end of of this function's code
539540
today = new_visibility_scores['techniques'][0]['visibility'][0]['score_logbook'][0]['date']

dettect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ def _menu(menu_parser):
318318
if not file_ds:
319319
quit() # something went wrong in executing the search or 0 results where returned
320320
if args.update and check_file(args.file_tech, FILE_TYPE_TECHNIQUE_ADMINISTRATION, args.health):
321-
update_technique_administration_file(file_ds, args.file_tech)
321+
update_technique_administration_file(file_ds, args.file_tech, args.force_overwrite)
322322
if args.layer:
323323
generate_data_sources_layer(file_ds, args.output_filename, args.force_overwrite, args.layer_name, layer_settings)
324324
if args.excel:

0 commit comments

Comments
 (0)