From fe37fbb8c6446e9b58ef6f1c41d4c97c9445e0bd Mon Sep 17 00:00:00 2001 From: Horilla Date: Fri, 13 Jun 2025 10:52:30 +0530 Subject: [PATCH] [FIX] NOTIFICATIONS: Workaround for fix against Django 5 --- notifications/base/models.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/notifications/base/models.py b/notifications/base/models.py index ee274f545..b4b183437 100644 --- a/notifications/base/models.py +++ b/notifications/base/models.py @@ -225,7 +225,11 @@ class AbstractNotification(models.Model): abstract = True ordering = ("-timestamp",) # speed up notifications count query - index_together = ("recipient", "unread") + # index_together = ("recipient", "unread") + + indexes = [ + models.Index(fields=["recipient", "unread"]), + ] def __str__(self): ctx = {