mirror of
https://github.com/ansible/awx.git
synced 2026-03-15 07:57:29 -02:30
Update serializers to remove empty choices, provide default values for fields, and better indicate the field type when possible for OPTIONS requests and browsable API docs.
This commit is contained in:
@@ -734,6 +734,7 @@ class InventorySourceOptions(BaseModel):
|
||||
'''
|
||||
|
||||
SOURCE_CHOICES = [
|
||||
('', _('Manual')),
|
||||
('file', _('Local File, Directory or Script')),
|
||||
('rax', _('Rackspace Cloud Servers')),
|
||||
('ec2', _('Amazon EC2')),
|
||||
|
||||
@@ -41,6 +41,7 @@ class JobOptions(BaseModel):
|
||||
job_type = models.CharField(
|
||||
max_length=64,
|
||||
choices=JOB_TYPE_CHOICES,
|
||||
default='run',
|
||||
)
|
||||
inventory = models.ForeignKey(
|
||||
'Inventory',
|
||||
|
||||
@@ -203,6 +203,7 @@ class Project(UnifiedJobTemplate, ProjectOptions):
|
||||
)
|
||||
scm_update_cache_timeout = models.PositiveIntegerField(
|
||||
default=0,
|
||||
blank=True,
|
||||
)
|
||||
|
||||
@classmethod
|
||||
|
||||
Reference in New Issue
Block a user