Fix alert for multiple integrations (#19410)

This commit is contained in:
Joakim Sørensen 2021-09-21 09:37:28 +02:00 committed by GitHub
parent d3e378ff3e
commit dcb7f028d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -13,9 +13,11 @@ layout: default
{% if page.collection == "integrations" %}
{% assign active_alert = "" %}
{% for alert in site.data.alerts_data %}
{% if alert.integrations and alert.integrations[0].package == page.ha_domain %}
{% assign active_alert = alert.alert_url %}
{% endif %}
{% for integration in alert.integrations %}
{% if integration.package == page.ha_domain %}
{% assign active_alert = alert.alert_url %}
{% endif %}
{% endfor %}
{% endfor %}
{% if active_alert != "" %}
<div class="integration-alert">