From 620352d14568d8104445c584da7ed7223ed880e1 Mon Sep 17 00:00:00 2001 From: Jonathan Weth <git@jonathanweth.de> Date: Mon, 4 May 2020 20:20:37 +0200 Subject: [PATCH] Fix addressing_name_format --- aleksis/core/models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/aleksis/core/models.py b/aleksis/core/models.py index 1225d9249..6f4fff676 100644 --- a/aleksis/core/models.py +++ b/aleksis/core/models.py @@ -141,11 +141,11 @@ class Person(ExtensibleModel): return f"{self.last_name}, {self.first_name}" @property - def adressing_name(self) -> str: + def addressing_name(self) -> str: """Full name of person in format configured for addressing.""" - if get_site_preferences()["notification__addressing_name_format"] == "last_first": + if self.preferences["notification__addressing_name_format"] == "last_first": return f"{self.last_name}, {self.first_name}" - elif get_site_preferences()["notification__addressing_name_format"] == "first_last": + elif self.preferences["notification__addressing_name_format"] == "first_last": return f"{self.first_name} {self.last_name}" @property -- GitLab