* src/plugins/ImportCSV.py (CSVParser.process): fixed csv import with no

surname (bug #1603)

2008-01-15  Douglas S. Blank  <dblank@cs.brynmawr.edu>


svn: r9823
This commit is contained in:
Doug Blank 2008-01-15 18:34:09 +00:00
parent a453da4b6c
commit d1bc327764
2 changed files with 8 additions and 4 deletions

View File

@ -1,3 +1,7 @@
2008-01-15 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/plugins/ImportCSV.py (CSVParser.process): fixed csv import with no
surname (bug #1603)
2008-01-15 Douglas S. Blank <dblank@cs.brynmawr.edu> 2008-01-15 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/plugins/DefaultGramplets.py (TopSurnamesGramplet.main): make * src/plugins/DefaultGramplets.py (TopSurnamesGramplet.main): make
clicking on data easier by clicking on entire line (bug #1594) clicking on data easier by clicking on entire line (bug #1594)

View File

@ -425,9 +425,9 @@ class CSVParser:
# if this person already exists, don't create them # if this person already exists, don't create them
person = self.lookup("person", person_ref) person = self.lookup("person", person_ref)
if person == None: if person == None:
if surname == None and firstname == "": if surname == None:
print "Error: need both firstname and surname for new person on line %d" % line_number print "Warning: empty surname for new person on line %d" % line_number
continue # need a name if it is a new person surname = ""
# new person # new person
person = self.create_person(firstname, surname) person = self.create_person(firstname, surname)
name = gen.lib.Name() name = gen.lib.Name()