cli: fix a few bugs related to required OPTIONS

see: https://github.com/ansible/awx/issues/4581
see: https://github.com/ansible/awx/issues/4583
see: https://github.com/ansible/awx/issues/4560
This commit is contained in:
Ryan Petrello
2019-08-26 13:03:58 -04:00
parent e19035079e
commit ea36be3a0e
2 changed files with 19 additions and 0 deletions

View File

@@ -1990,6 +1990,9 @@ class InventorySourceSerializer(UnifiedJobTemplateSerializer, InventorySourceOpt
fields = ('*', 'name', 'inventory', 'update_on_launch', 'update_cache_timeout',
'source_project', 'update_on_project_update') + \
('last_update_failed', 'last_updated') # Backwards compatibility.
extra_kwargs = {
'inventory': {'required': True}
}
def get_related(self, obj):
res = super(InventorySourceSerializer, self).get_related(obj)