Commit 40aff30e authored by Sriram Karra's avatar Sriram Karra

Bugfix: Set a display name while writing to OL even if such a property is not available

parent 635ba75f
......@@ -728,10 +728,6 @@ class OLContact(Contact):
return
def _add_names_gender_to_olprops (self, olprops):
n = self.get_name()
if n:
olprops.append((mt.PR_DISPLAY_NAME, n))
fatag = self.get_proptags().valu('ASYNK_PR_FILE_AS')
if self.get_fileas():
olprops.append((fatag, self.get_fileas()))
......@@ -752,6 +748,24 @@ class OLContact(Contact):
if gn:
olprops.append((mt.PR_GIVEN_NAME, gn))
n = self.get_name()
if n:
olprops.append((mt.PR_DISPLAY_NAME, n))
else:
n = ''
if gn:
n += gn
if ln or mn:
n += ' '
if mn:
n += mn
if ln:
n += ' '
if ln:
n += ln
olprops.append((mt.PR_DISPLAY_NAME, n))
pr = self.get_prefix()
if pr:
olprops.append((mt.PR_DISPLAY_NAME_PREFIX, pr))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment