DB-API: ignore errors on secondary field lookups

This commit is contained in:
Doug Blank 2016-09-23 19:35:11 -04:00
parent 3b0e04fb78
commit 0ce1a91dec

View File

@ -37,6 +37,7 @@ import time
#
#-------------------------------------------------------------------------
from .baseobj import BaseObject
from gramps.gen.errors import HandleError
#-------------------------------------------------------------------------
#
@ -353,7 +354,13 @@ class TableObject(BaseObject):
# start over here:
obj = None
if current:
obj = ptype.join(db, current)
try:
obj = ptype.join(db, current)
except HandleError:
if ignore_errors:
obj = None
else:
raise
if part == "self":
current = obj
path_to = []