From: Michael Tremer Date: Fri, 2 Jan 2026 12:15:09 +0000 (+0000) Subject: sources: Force an update of empty sources X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=be1d9cedd16dc38f011addf519a590d4647d4aa0;p=dbl.git sources: Force an update of empty sources We assume that we could not parse any data and therefore we will just try again. Signed-off-by: Michael Tremer --- diff --git a/src/dnsbl/sources.py b/src/dnsbl/sources.py index a1035bf..9e2700d 100644 --- a/src/dnsbl/sources.py +++ b/src/dnsbl/sources.py @@ -202,6 +202,11 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True): # Collect all domains domains = set() + # Force an update if the list has no data + if len(self) == 0: + log.debug("Forcing update of %s because it has no data" % self) + force = True + with self.db.transaction(): with self.backend.client() as client: # Compose some request headers