Fixed issue with adding tags on notes and families in CSV
svn: r20916
This commit is contained in:
parent
b82496eada
commit
8f95806107
@ -526,6 +526,8 @@ class CSVParser(object):
|
|||||||
new_note.handle = create_id()
|
new_note.handle = create_id()
|
||||||
new_note.type.set(NoteType.PERSON)
|
new_note.type.set(NoteType.PERSON)
|
||||||
new_note.set(note)
|
new_note.set(note)
|
||||||
|
if self.default_tag:
|
||||||
|
new_note.add_tag(self.default_tag.handle)
|
||||||
self.db.add_note(new_note, self.trans)
|
self.db.add_note(new_note, self.trans)
|
||||||
child.add_note(new_note.handle)
|
child.add_note(new_note.handle)
|
||||||
self.db.commit_person(child, self.trans)
|
self.db.commit_person(child, self.trans)
|
||||||
@ -612,6 +614,8 @@ class CSVParser(object):
|
|||||||
new_note.handle = create_id()
|
new_note.handle = create_id()
|
||||||
new_note.type.set(NoteType.PERSON)
|
new_note.type.set(NoteType.PERSON)
|
||||||
new_note.set(note)
|
new_note.set(note)
|
||||||
|
if self.default_tag:
|
||||||
|
new_note.add_tag(self.default_tag.handle)
|
||||||
self.db.add_note(new_note, self.trans)
|
self.db.add_note(new_note, self.trans)
|
||||||
person.add_note(new_note.handle)
|
person.add_note(new_note.handle)
|
||||||
if grampsid is not None:
|
if grampsid is not None:
|
||||||
@ -729,8 +733,6 @@ class CSVParser(object):
|
|||||||
if wife.get_handle() != fam_wife_handle:
|
if wife.get_handle() != fam_wife_handle:
|
||||||
# this wife is not the same old one! Add her!
|
# this wife is not the same old one! Add her!
|
||||||
family.set_mother_handle(wife.get_handle())
|
family.set_mother_handle(wife.get_handle())
|
||||||
if self.default_tag:
|
|
||||||
family.add_tag(self.default_tag.handle)
|
|
||||||
LOG.debug(" returning existing family")
|
LOG.debug(" returning existing family")
|
||||||
return family
|
return family
|
||||||
# if not, create one:
|
# if not, create one:
|
||||||
@ -741,6 +743,8 @@ class CSVParser(object):
|
|||||||
family.set_gramps_id(id_)
|
family.set_gramps_id(id_)
|
||||||
# add it:
|
# add it:
|
||||||
family.set_handle(self.db.create_id())
|
family.set_handle(self.db.create_id())
|
||||||
|
if self.default_tag:
|
||||||
|
family.add_tag(self.default_tag.handle)
|
||||||
if husband:
|
if husband:
|
||||||
family.set_father_handle(husband.get_handle())
|
family.set_father_handle(husband.get_handle())
|
||||||
husband.add_family_handle(family.get_handle())
|
husband.add_family_handle(family.get_handle())
|
||||||
|
Loading…
Reference in New Issue
Block a user