Skip to content

Commit

Permalink
feat(info user) : rename var in templates due to the rebase + lint
Browse files Browse the repository at this point in the history
  • Loading branch information
jacquesfize committed Apr 3, 2024
1 parent 94d1df6 commit 186c5b4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion app/t_roles/route.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,9 +294,11 @@ def buildUserFullName(user):
fullname.append(user["prenom_role"].title())
return " ".join(fullname)


@route.app_template_filter()
def pretty_json_key(key):
return re.sub("([a-z])([A-Z])","\g<1> \g<2>",key)
return re.sub("([a-z])([A-Z])", "\g<1> \g<2>", key)


def pops(form, with_group=True):
"""
Expand Down
4 changes: 2 additions & 2 deletions app/templates/info_user.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{%set is_organisme = organisme is not none and organisme['nom_organisme'] != '' %}
{%set is_desc = user['desc_role'] is not none and user['desc_role'] != '' %}
{%set is_remarques = user['remarques'] is not none and user['remarques'] != '' %}
{%set is_champs_addi = user['champs_addi']['organisme'] is not none
{%set is_orga_champ_addi = user['champs_addi']['organisme'] is not none
and user['champs_addi']['organisme'] != '' %}
{%set is_date_insert = user['date_insert'] is not none and user['date_insert'] != '' %}
{%set is_date_update = user['date_update'] is not none and user['date_update'] != '' %}
Expand All @@ -33,7 +33,7 @@ <h3>Utilisateur "{{fullname}}"</h3>
{% endif %}
{% if is_organisme %}
<br /><strong>Organisme :</strong> {{organisme.nom_organisme}}
{% elif is_champs_addi %}
{% elif is_orga_champ_addi %}
<br /><strong>Organisme :</strong> {{user['champs_addi']['organisme']}}
{% endif %}
{% if is_remarques %}
Expand Down

0 comments on commit 186c5b4

Please sign in to comment.