0005553: GEDCOM import does not import references to repositories. rid_map was not being used. Also removed redundant code in __find_or_create_repository()
svn: r18826
This commit is contained in:
parent
371f6ca414
commit
79ca4f32d3
@ -2586,12 +2586,6 @@ class GedcomParser(UpdateCallback):
|
|||||||
repository inline instead of in a object.
|
repository inline instead of in a object.
|
||||||
"""
|
"""
|
||||||
repository = gen.lib.Repository()
|
repository = gen.lib.Repository()
|
||||||
if not gramps_id:
|
|
||||||
need_commit = True
|
|
||||||
gramps_id = self.dbase.find_next_repository_gramps_id()
|
|
||||||
else:
|
|
||||||
need_commit = False
|
|
||||||
|
|
||||||
intid = self.rid2id.get(gramps_id)
|
intid = self.rid2id.get(gramps_id)
|
||||||
if self.dbase.has_repository_handle(intid):
|
if self.dbase.has_repository_handle(intid):
|
||||||
repository.unserialize(self.dbase.get_raw_repository_data(intid))
|
repository.unserialize(self.dbase.get_raw_repository_data(intid))
|
||||||
@ -2599,8 +2593,6 @@ class GedcomParser(UpdateCallback):
|
|||||||
intid = self.__find_from_handle(gramps_id, self.rid2id)
|
intid = self.__find_from_handle(gramps_id, self.rid2id)
|
||||||
repository.set_handle(intid)
|
repository.set_handle(intid)
|
||||||
repository.set_gramps_id(gramps_id)
|
repository.set_gramps_id(gramps_id)
|
||||||
if need_commit:
|
|
||||||
self.dbase.commit_repository(repository, self.trans)
|
|
||||||
return repository
|
return repository
|
||||||
|
|
||||||
def __find_or_create_note(self, gramps_id):
|
def __find_or_create_note(self, gramps_id):
|
||||||
@ -5639,7 +5631,7 @@ class GedcomParser(UpdateCallback):
|
|||||||
+1 RIN <AUTOMATED_RECORD_ID> {0:1} p.*
|
+1 RIN <AUTOMATED_RECORD_ID> {0:1} p.*
|
||||||
+1 <<CHANGE_DATE>> {0:1} p.
|
+1 <<CHANGE_DATE>> {0:1} p.
|
||||||
"""
|
"""
|
||||||
repo = self.__find_or_create_repository(line.token_text)
|
repo = self.__find_or_create_repository(self.rid_map[line.token_text])
|
||||||
|
|
||||||
state = CurrentState()
|
state = CurrentState()
|
||||||
state.repo = repo
|
state.repo = repo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user