Skip to content

Commit

Permalink
Merge pull request #2979 from tumido/fix_action_icon_policy_profile
Browse files Browse the repository at this point in the history
Fix wrong icon for action in Policy Profiles
(cherry picked from commit 4835489)
  • Loading branch information
himdel authored and simaishi committed Dec 11, 2017
1 parent 6cb9da7 commit 4626a00
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 4626a00

Please sign in to comment.