ensures no duplicate tags per media entry
authorCaleb Forbes Davis V <caldavis@gmail.com>
Wed, 13 Jul 2011 03:52:32 +0000 (22:52 -0500)
committerCaleb Forbes Davis V <caldavis@gmail.com>
Wed, 13 Jul 2011 03:52:32 +0000 (22:52 -0500)
mediagoblin/util.py

index f2a2793b44389c7c728ffdbbdccba170d346bb74..951bdd512f8a70207b7c1542640cb684783eb612 100644 (file)
@@ -384,7 +384,7 @@ def convert_to_tag_list(tag_string):
     if tag_string:
         stripped_tag_string = u' '.join(tag_string.strip().split())
         for tag in stripped_tag_string.split(TAGS_DELIMITER):
-            if tag.strip():
+            if tag.strip() and tag not in taglist:
                 if TAGS_CASE_SENSITIVE:
                     taglist.append(tag.strip())
                 else: