Allow examples.get call without data
It wasn't possible to call examples.get without a --data parameter. This change checks if the opts.data is empty, and if so, just deals with it. Change-Id: I262e8f8b061d163e478c3b9fe611a44180119909
This commit is contained in:
@@ -67,6 +67,8 @@ def find_resource_cls(opts):
|
|||||||
|
|
||||||
|
|
||||||
def get_data_option(opts):
|
def get_data_option(opts):
|
||||||
|
if not opts.data:
|
||||||
|
return opts.data
|
||||||
try:
|
try:
|
||||||
iddy = uuid.UUID(opts.data)
|
iddy = uuid.UUID(opts.data)
|
||||||
return {'id': iddy}
|
return {'id': iddy}
|
||||||
|
Reference in New Issue
Block a user