mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Merge pull request #803 from cchurch/remove-fields-for-ad-hoc-commands
Remove unified_job_template and description fields for ad hoc commands
This commit is contained in:
commit
b8dfa3df16
@ -1737,6 +1737,12 @@ class AdHocCommandSerializer(UnifiedJobSerializer):
|
||||
},
|
||||
}
|
||||
|
||||
def get_field_names(self, declared_fields, info):
|
||||
field_names = super(AdHocCommandSerializer, self).get_field_names(declared_fields, info)
|
||||
# Meta inheritance and -field_name options don't seem to be taking
|
||||
# effect above, so remove the undesired fields here.
|
||||
return tuple(x for x in field_names if x not in ('unified_job_template', 'description'))
|
||||
|
||||
def build_standard_field(self, field_name, model_field):
|
||||
field_class, field_kwargs = super(AdHocCommandSerializer, self).build_standard_field(field_name, model_field)
|
||||
# Load module name choices dynamically from DB settings.
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user