cli: make "detail" actions actually respect Allow: headers

This commit is contained in:
Ryan Petrello
2019-09-09 19:30:31 -04:00
parent edb7ddb9ae
commit ee47e98c50
3 changed files with 23 additions and 5 deletions

View File

@@ -244,10 +244,11 @@ class CLI(object):
# parse any action arguments
if self.resource != 'settings':
for method in ('list', 'modify', 'create'):
parser.build_query_arguments(
method,
'GET' if method == 'list' else 'POST'
)
if method in parser.parser.choices:
parser.build_query_arguments(
method,
'GET' if method == 'list' else 'POST'
)
if from_sphinx:
parsed, extra = self.parser.parse_known_args(self.argv)
else: