From: Michael Tremer Date: Tue, 3 Mar 2026 15:59:27 +0000 (+0000) Subject: lists: Don't store the amount of pending reports any more X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c10dca4af3f694c7a85637c77ed0abcf1a5c74fa;p=dbl.git lists: Don't store the amount of pending reports any more This is not very reliable and we don't show the number anyways Signed-off-by: Michael Tremer --- diff --git a/src/database.sql b/src/database.sql index b92c69a..6e1b210 100644 --- a/src/database.sql +++ b/src/database.sql @@ -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 diff --git a/src/dbl/lists.py b/src/dbl/lists.py index 955f275..8eb1922 100644 --- a/src/dbl/lists.py +++ b/src/dbl/lists.py @@ -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): diff --git a/src/dbl/reports.py b/src/dbl/reports.py index 6071286..4657166 100644 --- a/src/dbl/reports.py +++ b/src/dbl/reports.py @@ -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()