From 3d2acd1ac68475693b92a72c5180bc27f2889014 Mon Sep 17 00:00:00 2001 From: Cameron Lamb Date: Wed, 20 Sep 2023 15:35:34 +0100 Subject: [PATCH] Use the first_name display method instead of preferred name (#459) --- src/peoplefinder/templatetags/profile.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/peoplefinder/templatetags/profile.py b/src/peoplefinder/templatetags/profile.py index e48c2cc02..33ef41c2e 100644 --- a/src/peoplefinder/templatetags/profile.py +++ b/src/peoplefinder/templatetags/profile.py @@ -19,7 +19,7 @@ def byte_hash(val: str): "style": ( f"--color-1: {byte_hash(profile.first_name)};" f" --color-2: {byte_hash(profile.last_name)};" - f" --color-3: {byte_hash(profile.preferred_first_name)}" + f" --color-3: {byte_hash(profile.get_first_name_display())};" ), } return mark_safe(" ".join([f'{k}="{v}"' for k, v in attrs.items()])) # noqa S308