From 04e60f6610787ab90b3027b748944ec5fe520417 Mon Sep 17 00:00:00 2001 From: jedi Date: Thu, 9 May 2024 23:24:43 +0200 Subject: [PATCH] stash --- core/notifications/models.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/core/notifications/models.py b/core/notifications/models.py index abb7bb7..af33126 100644 --- a/core/notifications/models.py +++ b/core/notifications/models.py @@ -9,6 +9,9 @@ class MessageTemplate(models.Model): created = models.DateTimeField(auto_now_add=True) marked_confidential = models.BooleanField(default=False) + def __str__(self): + return self.name + class UserNotificationChannel(models.Model): user = models.ForeignKey(ExtendedUser, models.CASCADE) @@ -20,3 +23,6 @@ class UserNotificationChannel(models.Model): def validate_constraints(self, exclude=None): # TODO: email -> emailaddress, telegram -> chatid return True + + def __str__(self): + return self.user.username + ' - ' + self.channel_type + ' -> ' + self.channel_target