From 7244e8094522336247aed1c12b10b4fa706adeef Mon Sep 17 00:00:00 2001 From: Stefan Koegl Date: Wed, 4 Aug 2010 21:08:27 +0200 Subject: [PATCH] don't create directory entries for weight 0 --- mygpo/data/management/commands/update-directory.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/mygpo/data/management/commands/update-directory.py b/mygpo/data/management/commands/update-directory.py index 28f4f66e..4cd52f49 100755 --- a/mygpo/data/management/commands/update-directory.py +++ b/mygpo/data/management/commands/update-directory.py @@ -22,6 +22,9 @@ class Command(BaseCommand): DirectoryEntry.objects.filter(podcast=podcast).delete() for tag, weight in get_weighted_tags(podcast, source_weights).iteritems(): + if weight == 0: + continue + DirectoryEntry.objects.create(podcast=podcast, tag=tag, ranking=weight) groups = PodcastGroup.objects.all().order_by('id').only('id') -- 2.11.4.GIT