Kaydet (Commit) 53754330 authored tarafından Joffrey F's avatar Joffrey F

Fix small decorator issue

üst 37fb9633
......@@ -11,11 +11,11 @@ def check_resource(f):
resource_id = kwargs.pop('container')
elif kwargs.get('image'):
resource_id = kwargs.pop('image')
if isinstance(resource_id, dict):
resource_id = resource_id.get('Id')
if not resource_id:
raise errors.NullResource(
'image or container param is undefined'
)
if isinstance(resource_id, dict):
resource_id = resource_id.get('Id')
return f(self, resource_id, *args, **kwargs)
return wrapped
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment