Write only mrel and frel if not empty
svn: r313
This commit is contained in:
parent
dccbafc3bb
commit
cd03c96911
@ -351,8 +351,16 @@ def exportData(database, filename, callback):
|
|||||||
|
|
||||||
write_ref(g,"childof",person.getMainFamily(),3)
|
write_ref(g,"childof",person.getMainFamily(),3)
|
||||||
for alt in person.getAltFamilyList():
|
for alt in person.getAltFamilyList():
|
||||||
g.write(" <childof ref=\"%s\" mrel=\"%s\" frel=\"%s\"/>\n" % \
|
if alt[1] != "":
|
||||||
(alt[0].getId(), alt[1], alt[2]))
|
mrel=' mrel="%s"' % alt[1]
|
||||||
|
else:
|
||||||
|
mrel=''
|
||||||
|
if alt[2] != "":
|
||||||
|
frel=' frel="%s"' % alt[2]
|
||||||
|
else:
|
||||||
|
frel=''
|
||||||
|
g.write(" <childof ref=\"%s\"%s%s/>\n" % \
|
||||||
|
(alt[0].getId(), mrel, frel))
|
||||||
|
|
||||||
for family in person.getFamilyList():
|
for family in person.getFamilyList():
|
||||||
write_ref(g,"parentin",family,3)
|
write_ref(g,"parentin",family,3)
|
||||||
|
Loading…
Reference in New Issue
Block a user