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
-4
View File
@@ -50,7 +50,6 @@ class Inventory(CommonModel):
variables = models.TextField(
blank=True,
default='',
null=True,
help_text=_('Inventory variables in JSON or YAML format.'),
)
has_active_failures = models.BooleanField(
@@ -164,7 +163,6 @@ class Host(CommonModelNameNotUnique):
inventory = models.ForeignKey(
'Inventory',
null=False,
related_name='hosts',
)
enabled = models.BooleanField(
@@ -289,7 +287,6 @@ class Group(CommonModelNameNotUnique):
inventory = models.ForeignKey(
'Inventory',
null=False,
related_name='groups',
)
# Can also be thought of as: parents == member_of, children == members
@@ -562,7 +559,6 @@ class InventorySource(PrimordialModel):
choices=INVENTORY_SOURCE_STATUS_CHOICES,
default='none',
editable=False,
null=True,
)
def save(self, *args, **kwargs):