Skip to content

Commit

Permalink
Omit description if empty
Browse files Browse the repository at this point in the history
  • Loading branch information
mraerino committed Sep 22, 2024
1 parent 4529d51 commit f7b255d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ubiquiti-edge-router.j2
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,9 @@ set protocols ripng interface {{ intf }}
set policy {{ policytype }} {{ pfxlist.name }} description "{{ pfxlist.description | slugify(**description_slugifier) }}"
{%- endif %}
{%- for rule in pfxlist.prefrules.all() %}
{%- if rule.description != '' %}
set policy {{ policytype }} {{ pfxlist.name }} rule {{ rule.index }} description "{{ rule.description | slugify(**description_slugifier) }}"
{%- endif %}
set policy {{ policytype }} {{ pfxlist.name }} rule {{ rule.index }} action {{ rule.action }}
set policy {{ policytype }} {{ pfxlist.name }} rule {{ rule.index }} prefix {{ rule.prefix.prefix if rule.prefix else rule.prefix_custom }}
{%- if rule.ge is not none %}
Expand Down

0 comments on commit f7b255d

Please sign in to comment.