Skip to content

Commit

Permalink
Update auth.py
Browse files Browse the repository at this point in the history
  • Loading branch information
daisieh committed Jan 17, 2025
1 parent ffed2b2 commit 6a70b40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/authx/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -680,7 +680,7 @@ def list_role_types_in_opa():
def get_role_type_in_opa(role_type):
result, status_code = get_service_store_secret("opa", key=f"site_roles")
if status_code == 200:
if role_type in result['site_roles'].keys():
if role_type in list(result['site_roles'].keys()):
return {role_type: result['site_roles'][role_type]}, 200
return {"error": f"role type {role_type} does not exist"}, 404
return result, status_code
Expand Down

0 comments on commit 6a70b40

Please sign in to comment.