user: handle user.attributes getter for multiple attributes (#32025)

This commit is contained in:
Paul Marillonnet 2019-04-05 16:19:20 +02:00
parent 653e824804
commit ba270490d8
1 changed files with 5 additions and 1 deletions

View File

@ -86,7 +86,11 @@ class Attributes(object):
if self.verified and (not atv or not atv.verified):
return None
if atv:
return atv.to_python()
if not isinstance(atv, (list, tuple)):
return atv.to_python()
else:
# multiple
return list(map(lambda x: x.to_python(), atv))
return None