This commit is contained in:
parent
06e4b8f40e
commit
25a37c9876
1 changed files with 1 additions and 4 deletions
|
@ -151,9 +151,6 @@ class AdminMixin:
|
|||
old_value = self.attr.value.decode() if hasattr(self, "attr") else None
|
||||
new_value = form.value.data if hasattr(form, "value") else None
|
||||
|
||||
profile = app.get_profile(self.dn)
|
||||
assert profile is not None
|
||||
|
||||
title_prefix = {"add": "Adding", "mod": "Modifying", "del": "Deleting"}[
|
||||
self.kind
|
||||
]
|
||||
|
@ -163,7 +160,7 @@ class AdminMixin:
|
|||
text = f"{old_text}\n{new_text}".strip()
|
||||
|
||||
email.send_papertrail(
|
||||
f"{title_prefix} {attr_name} for user {profile.username}",
|
||||
f"{title_prefix} {attr_name} for user {self.dn}",
|
||||
text,
|
||||
)
|
||||
|
||||
|
|
Loading…
Reference in a new issue