From 03bed89fabec5b37219bf3212f3990f9fed4dcd8 Mon Sep 17 00:00:00 2001 From: prculley Date: Thu, 6 Oct 2016 15:04:45 -0500 Subject: [PATCH] bug 9458, fix Import Vcard can create multiple surnames with all selected as 'Primary' --- data/tests/imp_vcard.difs | 5 ----- gramps/plugins/importer/importvcard.py | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) delete mode 100644 data/tests/imp_vcard.difs diff --git a/data/tests/imp_vcard.difs b/data/tests/imp_vcard.difs deleted file mode 100644 index dec244679..000000000 --- a/data/tests/imp_vcard.difs +++ /dev/null @@ -1,5 +0,0 @@ -Mismatch on file: imp_vcard.vcf -Person: I0019 handle=0000001800000018 - Diff on: Person, primary_name, surname list #2, primary - : True - : False diff --git a/gramps/plugins/importer/importvcard.py b/gramps/plugins/importer/importvcard.py index 8a8e747d8..d5fb5f625 100644 --- a/gramps/plugins/importer/importvcard.py +++ b/gramps/plugins/importer/importvcard.py @@ -384,6 +384,7 @@ class VCardParser: surname.set_surname(sname.strip()) surname.set_prefix(prefix.strip()) name.add_surname(surname) + name.set_primary_surname() if len(data_fields) > 1 and data_fields[1].strip(): given_name = ' '.join(self.unesc(