Fix issues with deleting roles:
1. Prevents roles from being created with the role 'None' 2. Only call EnvironmentRoles.delete() if the env_role exists 3. Update the filter on the role field of the app member form to return 'No Access'. This fixed an issue where if a role was deleted, then other env roles belonging to the app member could not be updated because the role field of the deleted env_role was invalid
This commit is contained in:
@@ -16,7 +16,7 @@ class EnvironmentForm(Form):
|
||||
environment_name,
|
||||
choices=ENV_ROLES,
|
||||
default=NO_ACCESS,
|
||||
filters=[lambda x: None if x == "None" else x],
|
||||
filters=[lambda x: NO_ACCESS if x == "None" else x],
|
||||
)
|
||||
deleted = BooleanField("Revoke Access", default=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user