Skip to content

Commit

Permalink
fix(servicediscovery): contact group is not working (#86)
Browse files Browse the repository at this point in the history
  • Loading branch information
garnier-quentin committed Dec 9, 2020
1 parent 6f2b454 commit b606f46
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -246,10 +246,10 @@ sub get_rules {
}
foreach my $row (@$datas2) {
# Already add it
next if (defined($rules->{ $_->[0] }->{contact}->{ $row->[1] }));
if ((my $contact = get_contact(class_object_centreon => $options{class_object_centreon}, contact_id => $row->[1]))) {
next if (defined($rules->{ $_->[0] }->{contact}->{ $row->[0] }));
if ((my $contact = get_contact(class_object_centreon => $options{class_object_centreon}, contact_id => $row->[0]))) {
$rules->{ $_->[0] }->{contact} = {} if (!defined($rules->{ $_->[0] }->{contact}));
$rules->{ $_->[0] }->{contact}->{$contact->{contact_id}} = { contact_email => $contact->{contact_email} };
$rules->{ $_->[0] }->{contact}->{ $contact->{contact_id} } = { contact_email => $contact->{contact_email} };
}
}
}
Expand Down

0 comments on commit b606f46

Please sign in to comment.