print_api_result: fix test for undefined $result_schema
authorDietmar Maurer <dietmar@proxmox.com>
Tue, 31 Jul 2018 06:29:45 +0000 (08:29 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Tue, 31 Jul 2018 06:29:45 +0000 (08:29 +0200)
src/PVE/CLIFormatter.pm

index 411da5d..dfc3679 100644 (file)
@@ -409,7 +409,7 @@ sub print_api_result {
 
     my $format = $options->{'output-format'} // 'text';
 
-    if (!$result_schema) {
+    if ($result_schema) {
        return if $result_schema->{type} eq 'null';
     } else {
        my $type = $guess_type->($data);