diff --git a/photo_review/auto_photo_review.py b/photo_review/auto_photo_review.py index c4561e6..fdf40f6 100644 --- a/photo_review/auto_photo_review.py +++ b/photo_review/auto_photo_review.py @@ -170,7 +170,7 @@ def information_extraction(phrec, pk_phhd): else: tmp_info_extract = [] - if len(tmp_info_extract) > len(info_extract): + if tmp_info_extract and len(tmp_info_extract) > len(info_extract): info_extract = tmp_info_extract ocr_text = tmp_ocr_text rec_type = tmp_rec_type