Fix tag links

Fixes #1741
This commit is contained in:
Joseph Schorr 2016-08-17 15:06:10 -04:00
parent 0b50928900
commit 193040a473
2 changed files with 3 additions and 3 deletions

View file

@ -678,7 +678,7 @@ def redirect_to_repository(namespace_name, repo_name, tag_name):
if permission.can() or is_public:
repo_path = '/'.join([namespace_name, repo_name])
return redirect(url_for('web.repository', path=repo_path, tag=tag_name))
return redirect(url_for('web.repository', path=repo_path, tab="tags", tag=tag_name))
abort(404)

View file

@ -41,8 +41,8 @@ def repository_tag_reference(repository_path_and_tag):
if not owner:
return tag
return """<a href="%s/repository/%s/%s?tag=%s">%s</a>""" % (get_app_url(), namespace, repository,
tag, tag)
return """<a href="%s/repository/%s/%s?tag=%s&tab=tags">%s</a>""" % (get_app_url(), namespace,
repository, tag, tag)
def repository_reference(pair):
if isinstance(pair, tuple):