Skip to content

Commit

Permalink
fix: Invalid display of checks with incomplete configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
mromulus committed Mar 12, 2024
1 parent f17e026 commit 8f8581e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@
= direction_text
.gap-1.leading-8
- checks.map do |check|
- next unless check.check_mode_special? || (check.protocol && check.ip_family)
.inline-block{title: relation_for(check)&.name}
= render ActorChipComponent.new(actor: actor_for(check), text: check.display_name)
2 changes: 1 addition & 1 deletion app/models/check.rb
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def display_name
when 'special'
special_label
when 'network'
"#{I18n.t("protocols.#{protocol}")} (#{I18n.t("ip_families.#{ip_family}")}): #{port}"
"#{I18n.t("protocols.#{protocol}")} (#{I18n.t("ip_families.#{ip_family}")}): #{port}" if protocol && ip_family
end
end

Expand Down

0 comments on commit 8f8581e

Please sign in to comment.