Fixed adding regular tags.
authorEevee <git@veekun.com>
Mon, 28 Dec 2009 07:19:23 +0000 (23:19 -0800)
committerEevee <git@veekun.com>
Mon, 28 Dec 2009 07:19:23 +0000 (23:19 -0800)
floof/lib/tags.py

index b42814e..0984982 100644 (file)
@@ -125,13 +125,13 @@ def add_tags(art, tag_string, adding_user, me):
             # Regular tag
             if add:
                 tag = find_or_create(TagText, text=tag_text)
             # Regular tag
             if add:
                 tag = find_or_create(TagText, text=tag_text)
-                find_or_create(Tag, art=art, tagger=user, tagtext=tag)
+                find_or_create(Tag, art=art, tagger=adding_user, tagtext=tag)
 
             else:
                 tag = TagText.get_by(text=tag_text)
                 if tag:
                     # XXX this will die
 
             else:
                 tag = TagText.get_by(text=tag_text)
                 if tag:
                     # XXX this will die
-                    tag_assoc = Tag.get_by(art=art, tagger=user, tagtext=tag)
+                    tag_assoc = Tag.get_by(art=art, tagger=adding_user, tagtext=tag)
                     tag_assoc.delete()
 
     elixir.session.commit()
                     tag_assoc.delete()
 
     elixir.session.commit()