8152: Error converting database after upgrade to Gramps 4.1.1

This commit is contained in:
Paul Franklin 2014-10-28 17:01:17 -07:00
parent 54fdf3ef8a
commit 84318f6ee1

View File

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