From 5f342eec5b55ea3f3c52c2f88b01f554e2d5a13e Mon Sep 17 00:00:00 2001 From: joaohortsenado <100957576+joaohortsenado@users.noreply.github.com> Date: Tue, 25 Jun 2024 10:37:08 -0300 Subject: [PATCH] fix: corrige bug na common tag format_user (#3702) Co-authored-by: joao --- sapl/base/templatetags/common_tags.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/sapl/base/templatetags/common_tags.py b/sapl/base/templatetags/common_tags.py index 8506669a4..9a60bf85e 100644 --- a/sapl/base/templatetags/common_tags.py +++ b/sapl/base/templatetags/common_tags.py @@ -84,6 +84,9 @@ def desc_operation(value): @register.filter def format_user(user): + if not user: + return "" + if user.first_name: return user.first_name + " " + user.last_name + " (" + user.username + ")" else: