mirror of
https://github.com/GSA/notifications-admin.git
synced 2026-05-05 16:38:59 -04:00
Don’t let _set_status_filters mutate original list
Mutating stuff is scary and prone to problems. Better for it to return a new list instead.
This commit is contained in:
@@ -14,9 +14,9 @@
|
||||
<h1 class="heading-large">
|
||||
|
||||
<span class="visually-hidden">
|
||||
{%- if request_args.get('status') != 'delivered,failed' -%}
|
||||
{%- if status != 'delivered,failed' -%}
|
||||
{%- for label, option, _, _ in status_filters -%}
|
||||
{%- if request_args.get('status', 'delivered,failed') == option -%}{{label}} {% endif -%}
|
||||
{%- if status == option -%}{{label}} {% endif -%}
|
||||
{%- endfor -%}
|
||||
{%- endif -%}
|
||||
</span>
|
||||
@@ -29,7 +29,7 @@
|
||||
{{ pill(
|
||||
'Status',
|
||||
status_filters,
|
||||
request_args.get('status', '')
|
||||
status
|
||||
) }}
|
||||
</div>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user