Prevent error from being raised when user is not trying to update a
disabled env role We were only checking to see if a role was disabled or deleted before raising an error, so I added in a check to see if the user was trying to update the env role before raising an error. The error should only be raised if the role is disabled or deleted AND the user is trying to assign a new role to the env role. I also added in a disabled property to the EnvironmentRole model to make things more readable.
This commit is contained in:
@@ -88,7 +88,7 @@ def test_disable_completed(application_role, environment):
|
||||
|
||||
environment_role = EnvironmentRoles.disable(environment_role.id)
|
||||
|
||||
assert environment_role.status == EnvironmentRole.Status.DISABLED
|
||||
assert environment_role.disabled
|
||||
|
||||
|
||||
def test_get_for_update(application_role, environment):
|
||||
|
Reference in New Issue
Block a user