Skip to content

Commit 20bbeb6

Browse files
committed
Enhance keycloak id type check
1 parent fde6089 commit 20bbeb6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

  • libraries/cloudharness-common/cloudharness/auth

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

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,10 @@ def get_token(username, password):
8787

8888
def is_uuid(s):
8989
import uuid
90+
if not s:
91+
return False
92+
if type(s) == uuid.UUID:
93+
return True
9094
try:
9195
uuid.UUID(s)
9296
return True

0 commit comments

Comments
 (0)