fix: fix filters

This commit is contained in:
2025-07-12 13:34:02 +02:00
parent 1ea04e98e8
commit b671d8fbb4

View File

@@ -259,10 +259,10 @@ class User(AbstractUser):
return self.get_absolute_url()
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):
return Notification.objects.filter(user=self, read=False).count()
return Notification.objects.filter(user_to_notify=self, read=False).count()
@property
def adoption_notices(self):