Correction import tag popularity
authorymh <ymh.work@gmail.com>
Tue, 12 Jul 2011 11:59:27 +0200
changeset 88 d89c497d29df
parent 87 d1c22af49d70
child 89 ecacd68cf859
Correction import tag popularity
web/hdabo/fixtures/datasheet_10.yaml.bz2
web/hdabo/fixtures/datasheet_347.yaml.bz2
web/hdabo/fixtures/datasheet_all.yaml.bz2
web/hdabo/management/commands/import_tag_popularity.py
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	Tue Jul 12 09:54:01 2011 +0200
+++ b/web/hdabo/management/commands/import_tag_popularity.py	Tue Jul 12 11:59:27 2011 +0200
@@ -146,5 +146,5 @@
                 
                 
                 for tag in Tag.objects.filter(normalized_label=label):
-                    tag.popularity += int(row['popularity'])
+                    tag.popularity = tag.popularity + int(row['popularity'])
                     tag.save()