1
0
Fork 0

Fixing up notifications.

This commit is contained in:
Adam Kelly 2020-04-22 12:43:10 +01:00
parent 0bf73fef24
commit 22b2a95fd3
6 changed files with 80 additions and 33 deletions

View file

@ -151,7 +151,7 @@ class ReadThrough(FedireadsModel):
NotificationType = models.TextChoices(
'NotificationType',
'FAVORITE REPLY TAG FOLLOW FOLLOW_REQUEST BOOST IMPORT_RESULT')
'FAVORITE REPLY TAG FOLLOW FOLLOW_REQUEST BOOST IMPORT')
class Notification(FedireadsModel):
''' you've been tagged, liked, followed, etc '''
@ -163,6 +163,8 @@ class Notification(FedireadsModel):
on_delete=models.PROTECT, null=True, related_name='related_user')
related_status = models.ForeignKey(
'Status', on_delete=models.PROTECT, null=True)
related_import = models.ForeignKey(
'ImportJob', on_delete=models.PROTECT, null=True)
read = models.BooleanField(default=False)
notification_type = models.CharField(
max_length=255, choices=NotificationType.choices)