Skip to content

Commit

Permalink
Fix tag_autocomplete issue. When we swapped to tag manager the signat…
Browse files Browse the repository at this point in the history
…ure changed and some of these were missed.
  • Loading branch information
dannon committed Jun 28, 2016
1 parent 15a4734 commit 2d92737
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/galaxy/webapps/galaxy/controllers/tag.py
Expand Up @@ -128,13 +128,13 @@ def _get_tag_autocomplete_names( self, trans, q, limit, timestamp, user=None, it
# Create and return autocomplete data.
ac_data = "#Header|Your Tags\n"
for row in result_set:
tag = self.get_tag_handler( trans ).get_tag_by_id( trans, row[0] )
tag = self.get_tag_handler( trans ).get_tag_by_id( row[0] )
# Exclude tags that are already applied to the item.
if ( item is not None ) and ( self.get_tag_handler( trans ).item_has_tag( trans, trans.user, item, tag ) ):
if ( item is not None ) and ( self.get_tag_handler( trans ).item_has_tag( trans.user, item, tag ) ):
continue
# Add tag to autocomplete data. Use the most frequent name that user
# has employed for the tag.
tag_names = self._get_usernames_for_tag( trans, trans.user, tag, item_class, item_tag_assoc_class )
tag_names = self._get_usernames_for_tag( trans.user, tag, item_class, item_tag_assoc_class )
ac_data += tag_names[0] + "|" + tag_names[0] + "\n"
return ac_data

Expand All @@ -146,7 +146,7 @@ def _get_tag_autocomplete_values( self, trans, q, limit, timestamp, user=None, i
tag_name_and_value = q.split( ":" )
tag_name = tag_name_and_value[0]
tag_value = tag_name_and_value[1]
tag = self.get_tag_handler( trans ).get_tag_by_name( trans, tag_name )
tag = self.get_tag_handler( trans ).get_tag_by_name( tag_name )
# Don't autocomplete if tag doesn't exist.
if tag is None:
return ""
Expand Down

0 comments on commit 2d92737

Please sign in to comment.