mirror of
https://github.com/ansible/awx.git
synced 2026-02-17 19:20:05 -03:30
use Options models to consolidate field_names list
This commit is contained in:
@@ -306,9 +306,9 @@ class Project(UnifiedJobTemplate, ProjectOptions, ResourceMixin):
|
||||
|
||||
@classmethod
|
||||
def _get_unified_job_field_names(cls):
|
||||
return ['name', 'description', 'local_path', 'scm_type', 'scm_url',
|
||||
'scm_branch', 'scm_clean', 'scm_delete_on_update',
|
||||
'credential', 'schedule', 'timeout',]
|
||||
return set(f.name for f in ProjectOptions._meta.fields) | set(
|
||||
['name', 'description', 'schedule']
|
||||
)
|
||||
|
||||
def save(self, *args, **kwargs):
|
||||
new_instance = not bool(self.pk)
|
||||
|
||||
Reference in New Issue
Block a user