fix: fix filters
This commit is contained in:
@@ -259,10 +259,10 @@ class User(AbstractUser):
|
|||||||
return self.get_absolute_url()
|
return self.get_absolute_url()
|
||||||
|
|
||||||
def get_unread_notifications(self):
|
def get_unread_notifications(self):
|
||||||
return Notification.objects.filter(user=self, read=False)
|
return Notification.objects.filter(user_to_notify=self, read=False)
|
||||||
|
|
||||||
def get_num_unread_notifications(self):
|
def get_num_unread_notifications(self):
|
||||||
return Notification.objects.filter(user=self, read=False).count()
|
return Notification.objects.filter(user_to_notify=self, read=False).count()
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def adoption_notices(self):
|
def adoption_notices(self):
|
||||||
|
Reference in New Issue
Block a user