Merge pull request #247 from prculley/vcard

bug 9458, fix Import Vcard can create multiple surnames with all selected as 'Primary'
This commit is contained in:
Paul Culley 2016-10-23 10:12:53 -05:00 committed by GitHub
commit 6923c53871
2 changed files with 1 additions and 5 deletions

View File

@ -1,5 +0,0 @@
Mismatch on file: imp_vcard.vcf
Person: I0019 handle=0000001800000018
Diff on: Person, primary_name, surname list #2, primary
<class 'bool'>: True
<class 'bool'>: False

View File

@ -384,6 +384,7 @@ class VCardParser:
surname.set_surname(sname.strip()) surname.set_surname(sname.strip())
surname.set_prefix(prefix.strip()) surname.set_prefix(prefix.strip())
name.add_surname(surname) name.add_surname(surname)
name.set_primary_surname()
if len(data_fields) > 1 and data_fields[1].strip(): if len(data_fields) > 1 and data_fields[1].strip():
given_name = ' '.join(self.unesc( given_name = ' '.join(self.unesc(