Standardise appearance of missing data

This makes the rendering the same as for "created_by_name" when the
data isn't present. It's a bit more complicated for "updated_at" so
I checked that it's implicitly covered by the tests, which fail if I
remove the "if" conditional for any of these fields.
This commit is contained in:
Ben Thorner
2022-04-06 18:14:43 +01:00
parent 7f52e8dedf
commit 0437e4a248

View File

@@ -31,11 +31,10 @@ Providers
{{ text_field(item.active) }}
{% if item.updated_at %}
{{ text_field(item.updated_at|format_datetime_short) }}
{% else %}
{{ text_field('None') }}
{% endif %}
{{ optional_text_field(
item.updated_at|format_datetime_short if item.updated_at,
default='None'
) }}
{{ optional_text_field(item.created_by_name, default='None') }}
@@ -56,11 +55,10 @@ Providers
{{ text_field(item.active) }}
{% if item.updated_at %}
{{ text_field(item.updated_at|format_datetime_short) }}
{% else %}
{{ text_field('None') }}
{% endif %}
{{ optional_text_field(
item.updated_at|format_datetime_short if item.updated_at,
default='None'
) }}
{{ optional_text_field(item.created_by_name, default='None') }}
{% endcall %}
@@ -80,11 +78,10 @@ Providers
{{ text_field(item.active) }}
{% if item.updated_at %}
{{ text_field(item.updated_at|format_datetime_short) }}
{% else %}
{{ text_field('None') }}
{% endif %}
{{ optional_text_field(
item.updated_at|format_datetime_short if item.updated_at,
default='None'
) }}
{{ optional_text_field(item.created_by_name, default='None') }}