Skip to content

Commit 508171b

Browse files
committed
TT-94 feat: add assertion for valid ids
1 parent 836e018 commit 508171b

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

utils/azure_users.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,7 @@ def update_role(self, user_id, role_id, is_grant):
139139
return self.to_azure_user(response.json())
140140

141141
def get_role_data(self, role_id, is_grant=True):
142+
assert role_id in ROLE_FIELD_VALUES.keys()
142143
field_name, field_value = ROLE_FIELD_VALUES[role_id]
143144
if is_grant:
144145
return {field_name: field_value}

0 commit comments

Comments
 (0)