6624: import an exported XML crashes gramps 4.0 - Actually a logic bug python 2 does not crash on.

svn: r22122
This commit is contained in:
Benny Malengier 2013-04-30 13:21:11 +00:00
parent 192fa328c2
commit 8a2ad56f61

View File

@ -2939,10 +2939,13 @@ class GrampsParser(UpdateCallback):
obj.add_tag(tag_handle)
def fix_not_instantiated(self):
uninstantiated = [(orig_handle, target) for orig_handle in
self.import_handles.keys() if
[target for target in self.import_handles[orig_handle].keys() if
not self.import_handles[orig_handle][target][INSTANTIATED]]]
uninstantiated = []
for orig_handle in self.import_handles.keys():
tglist = [target for target in self.import_handles[orig_handle].keys() if
not self.import_handles[orig_handle][target][INSTANTIATED]]
for target in tglist:
uninstantiated += [(orig_handle, target)]
if uninstantiated:
expl_note = Utils.create_explanation_note(self.db)
self.db.commit_note(expl_note, self.trans, time.time())