B #1666: Return -1 if the app has no vmtemplate associated

(cherry picked from commit 7d71609dfd)
This commit is contained in:
Alejandro Huertas Herrero authored and Ruben S. Montero committed 2019-03-21 11:57:46 +01:00
1 parent 4c6dda9e89
commit 0ac1fdeca9
1 file changed
+1 -1
+1 -1
View File
@@ -297,7 +297,7 @@ module OpenNebula
# @return [Integer, OpenNebula::Error] template id or error
# TODO this method needs to be extended to support [image_ids]
def create_vmtemplate(options, image_id = nil)
return if self['TEMPLATE/VMTEMPLATE64'].nil?
return -1 if self['TEMPLATE/VMTEMPLATE64'].nil?
tmpl = Base64.decode64(self['TEMPLATE/VMTEMPLATE64'])