Fixed two minor crashes in lib.tags.
authorEevee <git@veekun.com>
Wed, 9 Dec 2009 03:32:42 +0000 (19:32 -0800)
committerEevee <git@veekun.com>
Wed, 9 Dec 2009 03:32:42 +0000 (19:32 -0800)
Missed an occurrence of c.user.

Removing a relation tag was sending two 'art' parameters.

floof/lib/tags.py

index 2a9beaf..b42814e 100644 (file)
@@ -100,7 +100,7 @@ def add_tags(art, tag_string, adding_user, me):
         # Do work!
         if prefix:
             if tag_text == 'me':
         # Do work!
         if prefix:
             if tag_text == 'me':
-                target_user = c.user
+                target_user = me
             else:
                 target_user = User.get_by(name=tag_text)
 
             else:
                 target_user = User.get_by(name=tag_text)
 
@@ -118,7 +118,7 @@ def add_tags(art, tag_string, adding_user, me):
 
             else:
                 # XXX this will die for nonassociations
 
             else:
                 # XXX this will die for nonassociations
-                user_assoc = ArtUser.get_by(art=art, **user_assoc_data)
+                user_assoc = ArtUser.get_by(**user_assoc_data)
                 user_assoc.delete()
 
         else:
                 user_assoc.delete()
 
         else: