Skip to content

Commit

Permalink
Improve IDP debug email
Browse files Browse the repository at this point in the history
Prior to this change, the idp debug email was difficult to read, especially when there was no translated attribute name available.
This change improves the formatting and readability of the mail.

Fixes #1330
  • Loading branch information
johanib committed Jan 21, 2025
1 parent 20a61c1 commit 16c1cf7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ Error: {{ error[0]|trans({'%arg1%': error[1], '%arg2%': error[2], '%arg3%': erro
Warning: {{ warning[0]|trans({'%arg1%': warning[1], '%arg2%': warning[2], '%arg3%': warning[3]}) }}
{% endfor %}


{% for attributeName, attributeValues in attributes %}
"{{ attributeName }}"
----------------------------------------------------------
Name: {{ attributeName(attributeName, 'en') }}

English name: {{ attributeName(attributeName, 'en') }}

Values:
{% for attributeValue in attributeValues %}
Expand All @@ -34,8 +36,10 @@ Error: {{ error[0]|trans({'%arg1%': error[1], '%arg2%': error[2], '%arg3%': erro
{% for warning in validationResult.warnings(attributeName) %}
Warning: {{ warning[0]|trans({'%arg1%': warning[1], '%arg2%': warning[2], '%arg3%': warning[3]}) }}
{% endfor %}

{% endfor %}


Raw data
========

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ Error: {{ error[0]|trans({'%arg1%': error[1], '%arg2%': error[2], '%arg3%': erro
Warning: {{ warning[0]|trans({'%arg1%': warning[1], '%arg2%': warning[2], '%arg3%': warning[3]}) }}
{% endfor %}


{% for attributeName, attributeValues in attributes %}
"{{ attributeName }}"
----------------------------------------------------------
Name: {{ attributeName(attributeName, 'en') }}

English name: {{ attributeName(attributeName, 'en') }}

Values:
{% for attributeValue in attributeValues %}
Expand All @@ -34,8 +36,10 @@ Error: {{ error[0]|trans({'%arg1%': error[1], '%arg2%': error[2], '%arg3%': erro
{% for warning in validationResult.warnings(attributeName) %}
Warning: {{ warning[0]|trans({'%arg1%': warning[1], '%arg2%': warning[2], '%arg3%': warning[3]}) }}
{% endfor %}

{% endfor %}


Raw data
========

Expand Down

0 comments on commit 16c1cf7

Please sign in to comment.