[conduit/tracker] Change N handling so we don't create triples with no data - no more (uri, nameFoo, '')
- From: John Carr <johncarr src gnome org>
- To: svn-commits-list gnome org
- Subject: [conduit/tracker] Change N handling so we don't create triples with no data - no more (uri, nameFoo, '')
- Date: Fri, 19 Jun 2009 19:25:38 -0400 (EDT)
commit dde400c191e7658f55fd4eb3b8c936b342b5f0d0
Author: John Carr <john carr unrouted co uk>
Date: Wed Jun 17 11:39:04 2009 +0100
Change N handling so we don't create triples with no data - no more (uri, nameFoo, '')
conduit/modules/TrackerModule/TrackerModule.py | 15 ++++++++++-----
1 files changed, 10 insertions(+), 5 deletions(-)
---
diff --git a/conduit/modules/TrackerModule/TrackerModule.py b/conduit/modules/TrackerModule/TrackerModule.py
index ffbfd31..6528b48 100644
--- a/conduit/modules/TrackerModule/TrackerModule.py
+++ b/conduit/modules/TrackerModule/TrackerModule.py
@@ -82,11 +82,16 @@ class TrackerContacts(DataProvider.TwoWay):
c.birthdate = v[0].value
elif k == "n":
x = v[0].value
- c.namefamily = x.family
- c.namegiven = x.given
- c.nameadditional = x.additional
- c.namehonorificprefix = x.prefix
- c.namehonorificsuffix = x.suffix
+ if x.family:
+ c.namefamily = x.family
+ if x.given:
+ c.namegiven = x.given
+ if x.additional:
+ c.nameadditional = x.additional
+ if x.prefix:
+ c.namehonorificprefix = x.prefix
+ if x.suffix:
+ c.namehonorificsuffix = x.suffix
elif k == "adr":
x = v[0].value
adr = nco.PostalAddress.create(commit=False)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]