Fix image renaming logic in decort_osimage.__init__ method

rc-5.3.0^2
Dmitriy Smirnov 9 months ago
parent 57dba89b5a
commit 76a1ff1788

@ -314,8 +314,9 @@ class decort_osimage(DecortController):
if amodule.params['image_id'] != 0 and amodule.params['image_name']:
self.validated_image_id = amodule.params['image_id']
if amodule.params['image_name']:
self.validated_image_id, image_facts = self.decort_image_find(amodule)
if (self.validated_image_id and
amodule.params['image_name'] != image_facts['name']):
decort_osimage.decort_image_rename(self,amodule)
self.result['msg'] = ("Image renamed successfully")

Loading…
Cancel
Save