Fixes none values in first/last name to display properly.
This commit is contained in:
1 parent
2ac1b39f42
commit
99c793e2ad
4 files changed
+7
-6
No files matched your search
@@ -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:
|
||||
|
||||
Reference in new issue
Block a user