Skip to content

Commit

Permalink
The object needs to know its own name
Browse files Browse the repository at this point in the history
The object needs to know its own name stored in a read/write field
  • Loading branch information
mickenordin authored Mar 31, 2017
1 parent ea9af76 commit efd077b
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 efd077b

Please sign in to comment.