Fix spurious generation of empty 'Alternative Name' in place.merge()

with an empty name

Bug discovered during testing of fix to 8233 (thanks, Enno for
discovering the problem and the fix).
This commit is contained in:
kulath 2015-03-25 18:29:01 +00:00
parent c9d9925965
commit a2a68c64f7

View File

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