]> git.ipfire.org Git - dbl.git/commitdiff
lists: Don't store the amount of pending reports any more
authorMichael Tremer <michael.tremer@ipfire.org>
Tue, 3 Mar 2026 15:59:27 +0000 (15:59 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Tue, 3 Mar 2026 15:59:27 +0000 (15:59 +0000)
This is not very reliable and we don't show the number anyways

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/database.sql
src/dbl/lists.py
src/dbl/reports.py

index b92c69adff22b96e231a9ab424503f3ae76a63ed..6e1b2108d3b6bf781da097a2cc1aa3eba2aba6a7 100644 (file)
@@ -2,7 +2,7 @@
 -- PostgreSQL database dump
 --
 
-\restrict JPaknCY0oEioIF0KZXsQxd9k8J4KAoFZnnVs2RpIewZuAAWn2sRSbNubLxxk2P2
+\restrict 3D6w6Ba6aGIuuPKNG7TDbNdKg6QKBWtkvOqI9CgPZ9Rmbc8lGYUpRjUvPeflzFA
 
 -- Dumped from database version 17.7 (Debian 17.7-0+deb13u1)
 -- Dumped by pg_dump version 17.7 (Debian 17.7-0+deb13u1)
@@ -214,7 +214,6 @@ CREATE TABLE public.lists (
     updated_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL,
     description text,
     total_domains integer DEFAULT 0 NOT NULL,
-    pending_reports integer DEFAULT 0 NOT NULL,
     priority integer DEFAULT 0 NOT NULL,
     subsumed_domains integer DEFAULT 0 NOT NULL,
     optimized_at timestamp with time zone DEFAULT CURRENT_TIMESTAMP NOT NULL
@@ -684,5 +683,5 @@ ALTER TABLE ONLY public.sources
 -- PostgreSQL database dump complete
 --
 
-\unrestrict JPaknCY0oEioIF0KZXsQxd9k8J4KAoFZnnVs2RpIewZuAAWn2sRSbNubLxxk2P2
+\unrestrict 3D6w6Ba6aGIuuPKNG7TDbNdKg6QKBWtkvOqI9CgPZ9Rmbc8lGYUpRjUvPeflzFA
 
index 955f2759333b30e48b04a18d00b967f0057b9a95..8eb1922cd7dec6a429be7cfe69261d5edb541b9e 100644 (file)
@@ -558,10 +558,6 @@ class List(sqlmodel.SQLModel, database.BackendMixin, table=True):
                """
                return await self.backend.reports.create(list=self, **kwargs)
 
-       # Pending Reports
-
-       pending_reports : int = 0
-
        # Recently Reported?
 
        async def recently_reported(self, name, reported_by, block=None):
index 6071286de6be0aede2f106ddf6b9349c1204f21e..46571662504aef66c210effc157a1721f6295bbc 100644 (file)
@@ -143,9 +143,6 @@ class Reports(object):
                                comment=comment, reporter=report.reported_by, notify=False,
                        )
 
-               # Increment the counter of the list
-               report.list.pending_reports += 1
-
                # Send a notification to the reporter
                await report._send_opening_notification()
 
@@ -365,9 +362,6 @@ class Report(sqlmodel.SQLModel, database.BackendMixin, table=True):
                # Has this report been accepted?
                self.accepted = accept
 
-               # Decrement the counter for pending reports
-               self.list.pending_reports -= 1
-
                # Send a message to the reporter?
                await self._send_closing_notification()