Show More
@@ -13,7 +13,7 b' class Command(BaseCommand):' | |||
|
13 | 13 | |
|
14 | 14 | @transaction.atomic |
|
15 | 15 | def handle(self, *args, **options): |
|
16 | empty = Tag.objects.annotate(num_threads=Count('thread'))\ | |
|
16 | empty = Tag.objects.annotate(num_threads=Count('thread_tags'))\ | |
|
17 | 17 | .filter(num_threads=0).order_by('-required', 'name') |
|
18 | 18 | print('Removing {} empty tags'.format(empty.count())) |
|
19 | 19 | empty.delete() |
General Comments 0
You need to be logged in to leave comments.
Login now