

def add_existing_tag(tag_name, tag_manager):
    'Add a tag that already exists to an object. Return the normalized name.\n\n    Given a tag name and a TaggableManager, have the manager add the tag of\n    that name. The tag is matched case-insensitively. If there is no such tag,\n    raise Tag.DoesNotExist.\n\n    Return the canonically cased name of the tag.\n\n    '
    tag = Tag.objects.get(name__iexact=tag_name)
    tag_manager.add(tag)
    return tag.name

dataset/ETHPy150Open mozilla/kitsune/kitsune/tags/utils.py add_existing_tag/original