mirror of
https://github.com/netbirdio/plugins.git
synced 2026-05-22 18:44:07 -07:00
template fix (#3704)
fix template error if there is no 'records' in config at all
This commit is contained in:
@@ -5,11 +5,13 @@
|
||||
{% if domaindb.enabled == '1' and domaindb.type == 'primary' %}
|
||||
$TTL {{ domaindb.ttl }}
|
||||
@ IN SOA {{ domaindb.dnsserver }}. {{ domaindb.mailadmin|replace('@', '.') }}. ( {{ domaindb.serial|trim }} {{ domaindb.refresh }} {{ domaindb.retry }} {{ domaindb.expire }} {{ domaindb.negative }} )
|
||||
{% for record in helpers.sortDictList(OPNsense.bind.record.records.record, 'name', 'type' ) %}
|
||||
{% if record.domain == domaindb['@uuid'] %}
|
||||
{% if helpers.exists('OPNsense.bind.record.records.record') %}
|
||||
{% for record in helpers.sortDictList(OPNsense.bind.record.records.record, 'name', 'type' ) %}
|
||||
{% if record.domain == domaindb['@uuid'] %}
|
||||
{{ record.name }} {{ record.type }} {{ record.value }}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
Reference in New Issue
Block a user