summaryrefslogtreecommitdiffstats
path: root/askbot/management/commands/delete_unused_tags.py
diff options
context:
space:
mode:
Diffstat (limited to 'askbot/management/commands/delete_unused_tags.py')
-rw-r--r--askbot/management/commands/delete_unused_tags.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/askbot/management/commands/delete_unused_tags.py b/askbot/management/commands/delete_unused_tags.py
index acb28fa7..9b7c3c1b 100644
--- a/askbot/management/commands/delete_unused_tags.py
+++ b/askbot/management/commands/delete_unused_tags.py
@@ -13,7 +13,7 @@ class Command(NoArgsCommand):
total = tags.count()
deleted_tags = list()
for tag in tags:
- if tag.questions.all().count() == 0:
+ if not tag.threads.exists():
deleted_tags.append(tag.name)
tag.delete()
transaction.commit()