Skip to content

Commit

Permalink
Update: parse detail response
Browse files Browse the repository at this point in the history
  • Loading branch information
Charl1996 committed Oct 21, 2024
1 parent d42e09b commit caec3aa
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions hq_superset/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,12 +221,8 @@ def _get_domain_access(domain):
return {}, []

response_data = response.json()
if not response_data['objects']:
return {}, []

user = response_data['objects'][0]
hq_permissions = user['permissions']
roles = user['roles'] or []
hq_permissions = response_data['permissions']
roles = response_data['roles'] or []

# Map between HQ and CCA
permissions = {
Expand Down

0 comments on commit caec3aa

Please sign in to comment.