This commit is contained in:
j3d1 2024-05-09 23:24:43 +02:00
parent 07e1ee46a7
commit 04e60f6610

View file

@ -9,6 +9,9 @@ class MessageTemplate(models.Model):
created = models.DateTimeField(auto_now_add=True) created = models.DateTimeField(auto_now_add=True)
marked_confidential = models.BooleanField(default=False) marked_confidential = models.BooleanField(default=False)
def __str__(self):
return self.name
class UserNotificationChannel(models.Model): class UserNotificationChannel(models.Model):
user = models.ForeignKey(ExtendedUser, models.CASCADE) 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 def validate_constraints(self, exclude=None): # TODO: email -> emailaddress, telegram -> chatid
return True return True
def __str__(self):
return self.user.username + ' - ' + self.channel_type + ' -> ' + self.channel_target