6194: Database corrupted - TypeError: unhashable type: 'list'

A couple of minor changes missed off the previous commit (427ee2d)
This commit is contained in:
kulath 2014-03-05 18:03:54 +00:00
parent 447046060f
commit ec4c6c4cfc
2 changed files with 4 additions and 2 deletions

View File

@ -285,7 +285,9 @@ def gramps_upgrade_16(self):
note_list, change, tag_list, private)
LOG.debug(" upgrade new_family %s" % [new_family])
with BSDDBTxn(self.env, self.family_map) as txn:
txn.put(str(handle), new_family)
if isinstance(handle, UNITYPE):
handle = handle.encode('utf-8')
txn.put(handle, new_family)
self.update()
LOG.debug("%d families upgraded with %d citations in %d seconds. " %

View File

@ -2043,7 +2043,7 @@ class CheckIntegrity(object):
tag_references = len(self.invalid_tag_references)
name_format = len(self.removed_name_format)
replaced_sourcerefs = len(self.replaced_sourceref)
empty_objs = sum(len(obj) for obj in self.empty_objects.itervalues())
empty_objs = sum(len(obj) for obj in self.empty_objects.values())
errors = (photos + efam + blink + plink + slink + rel +
event_invalid + person +