mirror of
https://github.com/ZwareBear/awx.git
synced 2026-05-16 07:38:36 -05:00
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:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user