Fix bug that prevented tags with capital letters from being deleted.

This commit is contained in:
Jeremy Goecks
2010-03-02 09:51:05 -05:00
parent 9a8c5f6711
commit fa9367ed72
2 changed files with 5 additions and 8 deletions
-3
View File
@@ -1537,9 +1537,6 @@ class ItemTagAssociation ( object ):
self.value = None
self.user_value = None
def __str__ ( self ):
return "%s(item_id=%s, item_tag=%s, user_tname=%s, value=%s, user_value=%s)" % (self.__class__.__name__, self.item_id, self.tag_id, self.user_tname, self.value. self.user_value )
class HistoryTagAssociation ( ItemTagAssociation ):
pass
+5 -5
View File
@@ -211,12 +211,12 @@ class TagHandler( object ):
return tag
def _get_item_tag_assoc(self, user, item, tag_name):
"""Return ItemTagAssociation object for an item and a tag string; returns None if there is
no such tag."""
scrubbed_tag_name = self._scrub_tag_name(tag_name)
def _get_item_tag_assoc( self, user, item, tag_name ):
"""Return ItemTagAssociation object for a user, item, and tag string; returns None if there is
no such association."""
scrubbed_tag_name = self._scrub_tag_name( tag_name )
for item_tag_assoc in item.tags:
if ( item_tag_assoc.user == user ) and ( item_tag_assoc.tag.name == scrubbed_tag_name ):
if ( item_tag_assoc.user == user ) and ( item_tag_assoc.user_tname == scrubbed_tag_name ):
return item_tag_assoc
return None