# 63 Mail data deleted

* adds mail sending if shared data is deleted
* adds/updates translations
* refactors recording mails into separate email template folder email/recording
This commit is contained in:
2022-01-12 15:31:25 +01:00
parent d7a9f72c3e
commit 5295c08d99
10 changed files with 160 additions and 68 deletions

View File

@@ -76,3 +76,17 @@ class User(AbstractUser):
if notification_set:
mailer = Mailer()
mailer.send_mail_shared_data_unrecorded(obj_identifier, self)
def send_mail_shared_data_deleted(self, obj_identifier):
""" Sends a mail to the user in case of shared data has been deleted
Args:
obj_identifier ():
Returns:
"""
notification_set = self.is_notification_setting_set(UserNotificationEnum.NOTIFY_ON_SHARED_DATA_DELETED)
if notification_set:
mailer = Mailer()
mailer.send_mail_shared_data_deleted(obj_identifier, self)

View File

@@ -49,9 +49,6 @@ class UserActionLogEntry(models.Model):
"-timestamp",
)
def __str__(self):
return "{} | {} | {}".format(self.user.username, self.timestamp, self.action)
@property
def action_humanize(self):
""" Returns humanized version of enum