implement two methods for can_edit field for testing

This commit is contained in:
AlanCoding
2016-08-11 13:55:38 -04:00
parent 25fa05da81
commit eddc1a8ed2
3 changed files with 27 additions and 0 deletions

View File

@@ -105,6 +105,9 @@ class ProjectOptions(models.Model):
on_delete=models.SET_NULL,
)
def get_can_edit(self, user):
return user in self.admin_role
def clean_scm_type(self):
return self.scm_type or ''