Skip to content

Commit

Permalink
Fix wrong icon for action in Policy Profiles
Browse files Browse the repository at this point in the history
  • Loading branch information
tumido committed Dec 7, 2017
1 parent cff1101 commit 6fda2ed
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions app/presenters/tree_builder_policy_profile.rb
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,16 @@ def x_get_tree_ev_kids(parent, count_only, parents)

success = count_only_or_objects(count_only, pol_rec ? pol_rec.actions_for_event(parent, :success) : [])
failure = count_only_or_objects(count_only, pol_rec ? pol_rec.actions_for_event(parent, :failure) : [])
unless count_only
add_flag_to(success, :success) unless success.empty?
add_flag_to(failure, :failure) unless failure.empty?
end
success + failure
end

def add_flag_to(array, flag)
array.each do |i|
i.instance_variable_set(:@flag, flag)
end
end
end

0 comments on commit 6fda2ed

Please sign in to comment.