Skip to content

Commit 2c6d724

Browse files
committed
(accounts) improve filter_attrs to possibly return all attributes
1 parent a474dd5 commit 2c6d724

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

libraries/cloudharness-common/cloudharness/auth/user_attributes.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ def addChild(self, child):
1414
self.children.append(child)
1515

1616

17-
def _filter_attrs(attrs, valid_keys):
17+
def _filter_attrs(attrs, valid_keys={}):
1818
# only use the attributes defined by the valid keys map
1919
valid_attrs = {}
2020
if attrs is None:
2121
return valid_attrs
2222
for key in attrs:
23-
if key in valid_keys:
23+
if key in valid_keys or not valid_keys:
2424
# map to value
2525
valid_attrs.update({key: attrs[key][0]})
2626
return valid_attrs

0 commit comments

Comments
 (0)