Fixes none values in first/last name to display properly.

This commit is contained in:
Kevin McCarthy
2007-10-04 12:20:00 -07:00
parent 2ac1b39f42
commit 99c793e2ad
4 changed files with 7 additions and 6 deletions

View File

@@ -79,9 +79,9 @@ class Entity:
"""Get the list (array) of values for the attribute named name"""
return self.data.get(name)
def getValue(self,name):
def getValue(self,name,default=None):
"""Get the first value for the attribute named name"""
value = self.data.get(name,[None])
value = self.data.get(name,default)
if isinstance(value,list) or isinstance(value,tuple):
return value[0]
else: