Merge pull request #141 from prculley/bug9414

Bug 9414 fix empty Place Alternate Names on import
This commit is contained in:
Doug Blank 2016-05-11 16:39:49 -04:00
commit 636903bbc7

12
gramps/gen/lib/place.py Normal file → Executable file
View File

@ -631,9 +631,13 @@ class Place(CitationBase, NoteBase, MediaBase, UrlBase, PrimaryObject):
:param acquisition: instance to merge
:type acquisition: :class:'~.place.Place
"""
if acquisition.name and (acquisition.name not in self.alt_names):
self.alt_names.append(acquisition.name)
if acquisition.name.value:
if acquisition.name != self.name:
if acquisition.name not in self.alt_names:
self.alt_names.append(acquisition.name)
for addendum in acquisition.alt_names:
if addendum not in self.alt_names:
self.alt_names.append(addendum)
if addendum.value:
if addendum != self.name:
if addendum not in self.alt_names:
self.alt_names.append(addendum)