diff --git a/boards/management/commands/statistics.py b/boards/management/commands/statistics.py --- a/boards/management/commands/statistics.py +++ b/boards/management/commands/statistics.py @@ -11,7 +11,7 @@ class Command(BaseCommand): def handle(self, *args, **options): print('* Domains and their usage') domains = {} - for attachment in Attachment.objects.exclude(url=None): + for attachment in Attachment.objects.exclude(url=None).exclude(url=''): full_domain = attachment.url.split('/')[2] domain = get_domain(full_domain) if domain in domains: