]> git.proxmox.com Git - qemu-server.git/commitdiff
fix assertion
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 22 Apr 2013 07:43:54 +0000 (09:43 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 22 Apr 2013 07:43:54 +0000 (09:43 +0200)
PVE/API2/Qemu.pm

index f6d4eaec738257025c891aa27ff50c0998809ff3..7d716703b4da8b9acae9a63cac183a191b79a87d 100644 (file)
@@ -2393,7 +2393,7 @@ __PACKAGE__->register_method({
            PVE::QemuServer::check_lock($conf);
 
            die "unable to create template, because VM contains snapshots\n" 
-               if $conf->{snapshots};
+               if $conf->{snapshots} && scalar(keys %{$conf->{snapshots}});
 
            die "you can't convert a template to a template\n" 
                if PVE::QemuServer::is_template($conf) && !$disk;