# HG changeset patch # User neko259 # Date 2015-11-14 20:26:34 # Node ID fabf89e8d0403821b133ba616df04d10d005163b # Parent ec7160e0d8beebb1b0747ff5e20b1e862e7a3607 Fixed 'cleantags' command diff --git a/boards/management/commands/cleantags.py b/boards/management/commands/cleantags.py --- a/boards/management/commands/cleantags.py +++ b/boards/management/commands/cleantags.py @@ -13,7 +13,7 @@ class Command(BaseCommand): @transaction.atomic def handle(self, *args, **options): - empty = Tag.objects.annotate(num_threads=Count('thread'))\ + empty = Tag.objects.annotate(num_threads=Count('thread_tags'))\ .filter(num_threads=0).order_by('-required', 'name') print('Removing {} empty tags'.format(empty.count())) empty.delete()