refactored code for unknown persons in Photos 5

This commit is contained in:
Rhet Turnbull
2019-12-07 21:03:48 -08:00
parent d22affebd7
commit 0220b0eaff

View File

@@ -778,13 +778,9 @@ class PhotosDB:
"AND ZGENERICASSET.ZTRASHEDSTATE = 0 AND ZGENERICASSET.ZKIND = 0 " "AND ZGENERICASSET.ZTRASHEDSTATE = 0 AND ZGENERICASSET.ZKIND = 0 "
) )
for person in c: for person in c:
person_name = None
if person[0] is None: if person[0] is None:
continue continue
if person[0] == "": person_name = person[0] if person[0] != "" else _UNKNOWN_PERSON
person_name = _UNKNOWN_PERSON
else:
person_name = person[0]
if not person[1] in self._dbfaces_uuid: if not person[1] in self._dbfaces_uuid:
self._dbfaces_uuid[person[1]] = [] self._dbfaces_uuid[person[1]] = []
if not person_name in self._dbfaces_person: if not person_name in self._dbfaces_person: