Commits

danjac  committed b1c5e15

use set() for unique tags

  • Participants
  • Parent commits a199a23

Comments (0)

Files changed (1)

File newsmeme/models/posts.py

     @property
     def taglist(self):
         if self.tags is None:
-            return []
+            return set()
 
         tags = [t.strip() for t in self.tags.split(",")]
-        return [t for t in tags if t]
+        return set([t for t in tags if t])
 
     @cached_property
     def linked_taglist(self):