Merge pull request #4596 from ryanpetrello/fix-cli-required-args

cli: fix a few bugs related to required OPTIONS

Reviewed-by: https://github.com/apps/softwarefactory-project-zuul
This commit is contained in:
softwarefactory-project-zuul[bot]
2019-08-26 21:47:46 +00:00
committed by GitHub
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)