Skip to content

Commit 91378a6

Browse files
committed
minor fix in saml2
1 parent 939df7c commit 91378a6

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

backend/sky_viewer/common/saml2.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,8 +166,10 @@ def get_user_identifier(self, attributes: dict) -> Any:
166166
try:
167167
# Lookup value
168168
user_lookup_value = attributes.get(user_lookup_key, None)
169-
if isinstance(user_lookup_value, list) and len(user_lookup_value) > 0:
169+
170+
if user_lookup_value and isinstance(user_lookup_value, list):
170171
user_lookup_value = user_lookup_value[0]
172+
171173
logger.info(f"User Lookup Value: {user_lookup_value} Type: {type(user_lookup_value)}")
172174

173175
else:

0 commit comments

Comments
 (0)