2021-02-09 Change negative indexes to account for new columns

This commit is contained in:
William Schaefer 2021-02-09 17:34:10 -05:00
parent 29191dc802
commit 35007b7890

View File

@ -469,9 +469,9 @@ def normalize_db_entry(line, files_table, vs_parts_table, vs_info_table, fs_info
# Ignore TIFF size and hash if extracted from PDFs. # Ignore TIFF size and hash if extracted from PDFs.
# See JIRA-6951 for more details. # See JIRA-6951 for more details.
# index -1 = last element in the list, which is extension # index -3 = 3rd from the end, which is extension
# index -3 = 3rd from the end, which is the parent path. # index -5 = 5th from the end, which is the parent path.
if fields_list[-1] == "'tif'" and fields_list[-3].endswith(".pdf/'"): if fields_list[-3] == "'tif'" and fields_list[-5].endswith(".pdf/'"):
fields_list[15] = "'SIZE_IGNORED'" fields_list[15] = "'SIZE_IGNORED'"
fields_list[23] = "'MD5_IGNORED'" fields_list[23] = "'MD5_IGNORED'"
fields_list[24] = "'SHA256_IGNORED'" fields_list[24] = "'SHA256_IGNORED'"