]> git.proxmox.com Git - pve-common.git/commitdiff
cli: print_text_table: another fix for poperties without schema
authorDietmar Maurer <dietmar@proxmox.com>
Wed, 27 Jun 2018 10:01:40 +0000 (12:01 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Wed, 27 Jun 2018 10:35:55 +0000 (12:35 +0200)
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
src/PVE/CLIHandler.pm

index 36eb5a883f8062fb491f25800979aa97037b3031..a0d5b0e4a1ca5bd02ec73c78bb825e52b8d9e0e8 100644 (file)
@@ -495,7 +495,7 @@ sub print_text_table {
     printf $formatstring, map { $colopts->{$_}->{title} } @$props_to_print;
 
     if (defined($sort_key)) {
-       my $type = $returnprops->{$sort_key}->{type};
+       my $type = $returnprops->{$sort_key}->{type} // 'string';
        if ($type eq 'integer' || $type eq 'number') {
            @$data = sort { $a->{$sort_key} <=> $b->{$sort_key} } @$data;
        } else {