details: http://www.bx.psu.edu/hg/galaxy/rev/19d8ba4269ba changeset: 3458:19d8ba4269ba user: jeremy goecks <jeremy.goecks@emory.edu> date: Tue Mar 02 09:51:05 2010 -0500 description: Fix bug that prevented tags with capital letters from being deleted. diffstat: lib/galaxy/model/__init__.py | 3 --- lib/galaxy/tags/tag_handler.py | 10 +++++----- 2 files changed, 5 insertions(+), 8 deletions(-) diffs (34 lines): diff -r 144c01a8db6e -r 19d8ba4269ba lib/galaxy/model/__init__.py --- a/lib/galaxy/model/__init__.py Tue Mar 02 00:38:57 2010 -0500 +++ b/lib/galaxy/model/__init__.py Tue Mar 02 09:51:05 2010 -0500 @@ -1537,9 +1537,6 @@ 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 diff -r 144c01a8db6e -r 19d8ba4269ba lib/galaxy/tags/tag_handler.py --- a/lib/galaxy/tags/tag_handler.py Tue Mar 02 00:38:57 2010 -0500 +++ b/lib/galaxy/tags/tag_handler.py Tue Mar 02 09:51:05 2010 -0500 @@ -211,12 +211,12 @@ 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