Oct. 8, 2026
1:23 p.m.
On 10/8/26 5:03 AM, Andreas Vetter wrote:
Cool. And since there are a lot of empty archives: How would I find the empty archives to feed to this? Can MailingList.objects.get() come up with something like a number of archived mails or threads or used space?
Something like
>>> from hyperkitty.models import MailingList
>>> for mlist in MailingList.objects.all():
... if len(mlist.emails.all()) == 0:
... print(mlist.name)
...
will print the names of all empty archived lists. either replace
print(mlist.name) with mlist.delete or add mlist.delete (indented
the same amount) after print(mlist.name) to delete them.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan