mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-09 22:29:33 +00:00
pvenode: use 'UNKNOWN' if task status is missing
Signed-off-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
This commit is contained in:
parent
236f253c9e
commit
99aca71627
@ -165,7 +165,9 @@ our $cmddef = {
|
|||||||
list => [ 'PVE::API2::Tasks', 'node_tasks', [], { node => $nodename }, sub {
|
list => [ 'PVE::API2::Tasks', 'node_tasks', [], { node => $nodename }, sub {
|
||||||
my ($data, $schema, $options) = @_;
|
my ($data, $schema, $options) = @_;
|
||||||
foreach my $task (@$data) {
|
foreach my $task (@$data) {
|
||||||
if ($task->{status} ne 'OK' && $task->{status} ne 'RUNNING') {
|
if (!defined($task->{status})) {
|
||||||
|
$task->{status} = 'UNKNOWN';
|
||||||
|
} elsif ($task->{status} ne 'OK' && $task->{status} ne 'RUNNING') {
|
||||||
$task->{status} = 'ERROR';
|
$task->{status} = 'ERROR';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user