Fix image renaming logic in decort_osimage.__init__ method
This commit is contained in:
@@ -314,8 +314,9 @@ class decort_osimage(DecortController):
|
|||||||
|
|
||||||
|
|
||||||
if amodule.params['image_id'] != 0 and amodule.params['image_name']:
|
if amodule.params['image_id'] != 0 and amodule.params['image_name']:
|
||||||
self.validated_image_id = amodule.params['image_id']
|
self.validated_image_id, image_facts = self.decort_image_find(amodule)
|
||||||
if amodule.params['image_name']:
|
if (self.validated_image_id and
|
||||||
|
amodule.params['image_name'] != image_facts['name']):
|
||||||
decort_osimage.decort_image_rename(self,amodule)
|
decort_osimage.decort_image_rename(self,amodule)
|
||||||
self.result['msg'] = ("Image renamed successfully")
|
self.result['msg'] = ("Image renamed successfully")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user