9121 9146 9162: Cannot import gedcom generated by RootsMagic

custom place details ignoring PlaceName()
This commit is contained in:
romjerome 2016-01-16 15:13:53 +01:00
parent a9b42e8a3d
commit c7bfce5066

View File

@ -120,7 +120,7 @@ from gramps.gen.lib import (Address, Attribute, AttributeType, ChildRef,
MediaRef, Name, NameType, Note, NoteType, Person, PersonRef, Place, MediaRef, Name, NameType, Note, NoteType, Person, PersonRef, Place,
RepoRef, Repository, RepositoryType, Researcher, RepoRef, Repository, RepositoryType, Researcher,
Source, SourceMediaType, SrcAttribute, SrcAttributeType, Source, SourceMediaType, SrcAttribute, SrcAttributeType,
Surname, Tag, Url, UrlType, PlaceType, PlaceRef) Surname, Tag, Url, UrlType, PlaceType, PlaceRef, PlaceName)
from gramps.gen.db import DbTxn from gramps.gen.db import DbTxn
from gramps.gen.updatecallback import UpdateCallback from gramps.gen.updatecallback import UpdateCallback
from gramps.gen.mime import get_type from gramps.gen.mime import get_type
@ -5545,7 +5545,7 @@ class GedcomParser(UpdateCallback):
# Create the Place Details (it is committed with the event) # Create the Place Details (it is committed with the event)
place_detail = Place() place_detail = Place()
place_detail.set_name(location.get_street()) place_detail.set_name(PlaceName(value=location.get_street()))
place_detail.set_title(location.get_street()) place_detail.set_title(location.get_street())
# For RootsMagic etc. Place Details e.g. address, hospital, cemetary # For RootsMagic etc. Place Details e.g. address, hospital, cemetary
place_detail.set_type((PlaceType.CUSTOM, _("Detail"))) place_detail.set_type((PlaceType.CUSTOM, _("Detail")))