Update
svn: r7071
This commit is contained in:
parent
51c468f672
commit
871180a272
@ -4,10 +4,11 @@
|
||||
* src/docgen/OpenOfficeDoc.py: fix rotation angle
|
||||
|
||||
2006-07-24 Alex Roitman <shura@gramps-project.org>
|
||||
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Map Other from
|
||||
gramps2.0.x to Unknown.
|
||||
* src/GrampsDb/_ReadXML.py (start_name): Map Other from
|
||||
gramps2.0.x to Unknown.
|
||||
* src/GrampsDb/_GrampsBSDDB.py (gramps_upgrade_9): Map "Other
|
||||
Name" from gramps2.0.x to the "Unknown" name type;
|
||||
work out the case of no events.
|
||||
* src/GrampsDb/_ReadXML.py (start_name): Map "Other Name" from
|
||||
gramps2.0.x to the "Unknown" name type.
|
||||
(start_database): Add method to extract the XML version.
|
||||
* src/DisplayTabs/_BackRefModel.py (BackRefModel.load_model):
|
||||
Translate displayed object type.
|
||||
|
@ -1474,8 +1474,8 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
||||
for name in [person.primary_name] + person.alternate_names:
|
||||
old_type = name.type
|
||||
new_type = NameType()
|
||||
# Mapping "Other" from gramps 2.0.x to Unknown
|
||||
if old_type == 'Other':
|
||||
# Mapping "Other Name" from gramps 2.0.x to Unknown
|
||||
if old_type == 'Other Name':
|
||||
new_type.set(NameType.UNKNOWN)
|
||||
else:
|
||||
new_type.set_from_xml_str(old_type)
|
||||
@ -1554,9 +1554,12 @@ class GrampsBSDDB(GrampsDbBase,UpdateCallback):
|
||||
# Find the largest ID and extract the integer:
|
||||
# We can do this because in 2.0.x the event id is never exposed
|
||||
eid_list.sort()
|
||||
last_id = eid_list[-1]
|
||||
nre = re.compile("\D+(\d+)")
|
||||
max_id_number = int(nre.match(last_id).groups()[0])
|
||||
if len(eid_list) == 0:
|
||||
max_id_number = 0
|
||||
else:
|
||||
last_id = eid_list[-1]
|
||||
nre = re.compile("\D+(\d+)")
|
||||
max_id_number = int(nre.match(last_id).groups()[0])
|
||||
|
||||
# get the list of all IDs that are non-unique
|
||||
dup_ids = [eid for eid in eid_list if eid_list.count(eid) > 1 ]
|
||||
|
@ -1016,8 +1016,8 @@ class GrampsParser(UpdateCallback):
|
||||
if not self.in_witness:
|
||||
self.name = RelLib.Name()
|
||||
name_type = attrs['type']
|
||||
# Mapping "Other" from gramps 2.0.x to Unknown
|
||||
if (self.version_string == '1.0.0') and (name_type == 'Other'):
|
||||
# Mapping "Other Name" from gramps 2.0.x to Unknown
|
||||
if (self.version_string=='1.0.0') and (name_type=='Other Name'):
|
||||
self.name.set_type(RelLib.NameType.UNKNOWN)
|
||||
else:
|
||||
self.name.type.set_from_xml_str(name_type)
|
||||
|
Loading…
Reference in New Issue
Block a user