From 5c54f9339652ae3714b25f917fb0d18e748e202f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gon=C3=A9ri=20Le=20Bouder?= Date: Mon, 22 Aug 2011 14:42:51 +0200 Subject: [PATCH] add a missing keys --- lib/FusionInventory/Agent/Task/Deploy.pm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/FusionInventory/Agent/Task/Deploy.pm b/lib/FusionInventory/Agent/Task/Deploy.pm index 85f79d8490..a18d3618a8 100644 --- a/lib/FusionInventory/Agent/Task/Deploy.pm +++ b/lib/FusionInventory/Agent/Task/Deploy.pm @@ -91,10 +91,9 @@ sub _validateAnswer { $$msgRef = "associatedFiles should be an hash"; return; } - - foreach my $k (%{$answer->{associatedFiles}}) { + foreach my $k (keys %{$answer->{associatedFiles}}) { foreach (qw/mirrors multiparts name/) { - if (!defined($answer->{associatedFiles}{$k}{$_})) { + if (!defined($answer->{associatedFiles}->{$k}->{$_})) { $$msgRef = "Missing key `$_' in associatedFiles"; return; }