From: Dietmar Maurer Date: Wed, 27 Jun 2018 10:01:40 +0000 (+0200) Subject: cli: print_text_table: another fix for poperties without schema X-Git-Url: https://git.proxmox.com/?p=pve-common.git;a=commitdiff_plain;h=3c3d1e07c805630a5811f6d5db4f14dc80a52fc0;hp=ead1edfffd80e4679bf8f00902d3a56a9abf305a cli: print_text_table: another fix for poperties without schema Signed-off-by: Dietmar Maurer --- diff --git a/src/PVE/CLIHandler.pm b/src/PVE/CLIHandler.pm index 36eb5a8..a0d5b0e 100644 --- a/src/PVE/CLIHandler.pm +++ b/src/PVE/CLIHandler.pm @@ -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 {