Skip to content

Commit

Permalink
Merge pull request #2 from mickenordin/master
Browse files Browse the repository at this point in the history
The object needs to know its own name
  • Loading branch information
theseal authored Apr 3, 2017
2 parents d24e843 + efd077b commit 277600d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions SU/API/Icinga2.pm
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ sub export {
}
my @results;
foreach my $object ( @{ $result->{results} } ) {
# The object needs to know its own name stored in a read/write field
$object->{attrs}{vars}{__export_name} = $object->{attrs}{__name};

my %hash;
foreach my $key (sort @keys) {
$hash{attrs}{$key} = $object->{attrs}{$key};
Expand Down

0 comments on commit 277600d

Please sign in to comment.