Remove unused code
This commit is contained in:
parent
303d89088b
commit
e341a73dd1
@ -58,7 +58,6 @@ class NewForm(BaseForm):
|
|||||||
|
|
||||||
|
|
||||||
class UpdateMemberForm(PermissionsForm):
|
class UpdateMemberForm(PermissionsForm):
|
||||||
# permission_sets = FormField(PermissionsForm)
|
|
||||||
environment_roles = FieldList(FormField(EnvironmentForm))
|
environment_roles = FieldList(FormField(EnvironmentForm))
|
||||||
|
|
||||||
@property
|
@property
|
||||||
|
@ -71,20 +71,6 @@ class ApplicationRole(
|
|||||||
elif self.latest_invitation:
|
elif self.latest_invitation:
|
||||||
return self.latest_invitation.user_name
|
return self.latest_invitation.user_name
|
||||||
|
|
||||||
@property
|
|
||||||
def user_first_name(self):
|
|
||||||
if self.user:
|
|
||||||
return self.user.first_name
|
|
||||||
elif self.latest_invitation:
|
|
||||||
return self.latest_invitation.first_name
|
|
||||||
|
|
||||||
@property
|
|
||||||
def user_last_name(self):
|
|
||||||
if self.user:
|
|
||||||
return self.user.last_name
|
|
||||||
elif self.latest_invitation:
|
|
||||||
return self.latest_invitation.last_name
|
|
||||||
|
|
||||||
def __repr__(self):
|
def __repr__(self):
|
||||||
return "<ApplicationRole(application='{}', user_id='{}', id='{}', permissions={})>".format(
|
return "<ApplicationRole(application='{}', user_id='{}', id='{}', permissions={})>".format(
|
||||||
self.application.name, self.user_id, self.id, self.permissions
|
self.application.name, self.user_id, self.id, self.permissions
|
||||||
|
@ -42,11 +42,6 @@ def test_update_member_form():
|
|||||||
"perms_team_mgmt": True,
|
"perms_team_mgmt": True,
|
||||||
"perms_env_mgmt": False,
|
"perms_env_mgmt": False,
|
||||||
"perms_del_env": False,
|
"perms_del_env": False,
|
||||||
"environment_roles": {
|
|
||||||
"environment_id": 123,
|
|
||||||
"environment_name": "testing",
|
|
||||||
"role": ENV_ROLES[0][0],
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
form = UpdateMemberForm(data=form_data)
|
form = UpdateMemberForm(data=form_data)
|
||||||
assert form.validate()
|
assert form.validate()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user