Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix wrong icon for action in Policy Profiles #2979

Merged
merged 1 commit into from
Dec 7, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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