Update image_browser.py

added "alternate_hash is not None" for reapply ranking, in the event that the filehash table is missing an entry for a path
pull/218/head
Kapowpenguin1 2023-07-19 15:03:07 -04:00 committed by GitHub
parent f42ada4007
commit 167833e0b1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -656,7 +656,7 @@ def reapply_ranking(path_recorder, maint_wait):
if ranking_by_name is not None:
hash = wib_db.get_hash(file)
(alternate_file, alternate_ranking) = ranking_by_name
if alternate_ranking is not None:
if alternate_ranking is not None and alternate_hash is not None:
(alternate_hash,) = alternate_hash
# Does the found filename's file have no hash or the same hash?
if alternate_hash is None or hash == alternate_hash: