mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Fixes none values in first/last name to display properly.
This commit is contained in:
@@ -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