If you try to lookup an object too early, you might find that the tbl is still a dict; this protects such early lookups from crashing
svn: r20812
This commit is contained in:
parent
199f81a832
commit
2078bcc17c
@ -709,6 +709,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
|||||||
return self.get_from_handle(handle, Tag, self.tag_map)
|
return self.get_from_handle(handle, Tag, self.tag_map)
|
||||||
|
|
||||||
def __get_obj_from_gramps_id(self, val, tbl, class_, prim_tbl):
|
def __get_obj_from_gramps_id(self, val, tbl, class_, prim_tbl):
|
||||||
|
if isinstance(tbl, dict): return None ## trying to get object too early
|
||||||
try:
|
try:
|
||||||
data = tbl.get(str(val), txn=self.txn)
|
data = tbl.get(str(val), txn=self.txn)
|
||||||
if data is not None:
|
if data is not None:
|
||||||
|
Loading…
Reference in New Issue
Block a user