From 2078bcc17cf9b32fda5e1a33afd5008ef76c5f08 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Fri, 21 Dec 2012 18:22:52 +0000 Subject: [PATCH] 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 --- src/gen/db/read.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gen/db/read.py b/src/gen/db/read.py index deb568cd8..4b99c1f92 100644 --- a/src/gen/db/read.py +++ b/src/gen/db/read.py @@ -709,6 +709,7 @@ class DbBsddbRead(DbReadBase, Callback): return self.get_from_handle(handle, Tag, self.tag_map) 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: data = tbl.get(str(val), txn=self.txn) if data is not None: