AC-636 Fix existing projects with scm_type=null to always use empty string. Update validation and tests to ensure None gets automatically coerced to an empty string on saving a project.

This commit is contained in:
Chris Church
2013-11-14 17:14:10 -05:00
parent 520f5e4861
commit cbd6132d4b
9 changed files with 855 additions and 26 deletions

View File

@@ -87,21 +87,18 @@ class Project(CommonModel):
max_length=8,
choices=SCM_TYPE_CHOICES,
blank=True,
null=True,
default='',
verbose_name=_('SCM Type'),
)
scm_url = models.CharField(
max_length=1024,
blank=True,
null=True,
default='',
verbose_name=_('SCM URL'),
)
scm_branch = models.CharField(
max_length=256,
blank=True,
null=True,
default='',
verbose_name=_('SCM Branch'),
help_text=_('Specific branch, tag or commit to checkout.'),
@@ -154,7 +151,7 @@ class Project(CommonModel):
choices=PROJECT_STATUS_CHOICES,
default='ok',
editable=False,
null=True,
null=True, # FIXME: Remove
)
def save(self, *args, **kwargs):