correct popularity import. close bug #17
Binary file web/hdabo/fixtures/datasheet_10.yaml.bz2 has changed
Binary file web/hdabo/fixtures/datasheet_347.yaml.bz2 has changed
Binary file web/hdabo/fixtures/datasheet_all.yaml.bz2 has changed
--- a/web/hdabo/management/commands/import_tag_popularity.py Fri Jul 08 18:13:54 2011 +0200
+++ b/web/hdabo/management/commands/import_tag_popularity.py Fri Jul 08 21:22:10 2011 +0200
@@ -130,8 +130,9 @@
row = dict([(safe_decode(key, self.encoding), safe_decode(value, self.encoding)) for key, value in row.items()])
label = normalize(row['label'].strip())
+ popularity_str = row['popularity']
- if not label:
+ if not label or not popularity_str:
continue
for tag in Tag.objects.filter(normalized_label__icontains=label):
tag.popularity = int(row['popularity'])