From: Michael Tremer Date: Sat, 3 Jan 2026 13:31:28 +0000 (+0000) Subject: sources: Always return an integer for the length of the source X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=558eb619158b1ff357e792e6867213e7d7af762d;p=dbl.git sources: Always return an integer for the length of the source Signed-off-by: Michael Tremer --- diff --git a/src/dnsbl/sources.py b/src/dnsbl/sources.py index 8258924..01868ac 100644 --- a/src/dnsbl/sources.py +++ b/src/dnsbl/sources.py @@ -104,7 +104,7 @@ class Source(sqlmodel.SQLModel, database.BackendMixin, table=True): return self.name def __len__(self): - return self.total_domains + return self.total_domains or 0 def __hash__(self): # Only hashable once the object has an ID