From fb2dbaa6db889c66b6ac257c290590214b585c13 Mon Sep 17 00:00:00 2001 From: William Schaefer Date: Thu, 4 Mar 2021 14:31:06 -0500 Subject: [PATCH] 7370 fix copy paste that would have left source object id unchanged --- test/script/tskdbdiff.py | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/test/script/tskdbdiff.py b/test/script/tskdbdiff.py index f375934783..a50911b05c 100644 --- a/test/script/tskdbdiff.py +++ b/test/script/tskdbdiff.py @@ -661,20 +661,20 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info fields_list[1] = "NULL" #substitue the source object id for a non changing value source_obj_id = fields_list[3] - if os_account_id in files_table.keys(): - fields_list[1] = files_table[parent_id] - elif os_account_id in vs_parts_table.keys(): - fields_list[1] = vs_parts_table[parent_id] - elif os_account_id in vs_info_table.keys(): - fields_list[1] = vs_info_table[parent_id] - elif os_account_id in fs_info_table.keys(): - fields_list[1] = fs_info_table[parent_id] - elif os_account_id in images_table.keys(): - fields_list[1] = images_table[parent_id] - elif os_account_id in accounts_table.keys(): - fields_list[1] = accounts_table[parent_id] - elif os_account_id == 'NULL': - fields_list[1] = "NULL" + if source_obj_id in files_table.keys(): + fields_list[3] = files_table[parent_id] + elif source_obj_id in vs_parts_table.keys(): + fields_list[3] = vs_parts_table[parent_id] + elif source_obj_id in vs_info_table.keys(): + fields_list[3] = vs_info_table[parent_id] + elif source_obj_id in fs_info_table.keys(): + fields_list[3] = fs_info_table[parent_id] + elif source_obj_id in images_table.keys(): + fields_list[3] = images_table[parent_id] + elif source_obj_id in accounts_table.keys(): + fields_list[3] = accounts_table[parent_id] + elif source_obj_id == 'NULL': + fields_list[3] = "NULL" newLine = ('INSERT INTO "tsk_os_account_attributes" VALUES(' + ','.join(fields_list[1:]) + ');') # remove id else: return line