endpoints.web: fix unknown identifier

This commit is contained in:
Jimmy Zelinskie 2017-04-13 13:54:20 -04:00
parent cfff194fb2
commit 93d1439e04

View file

@ -734,7 +734,7 @@ def redirect_to_repository(namespace_name, repo_name, tag_name):
'repo_name': repo_name,
}
if not namespace_exists or (namespace_permission and not repo_exists):
if not namespace_exists or (namespace_permission and repo is None):
resp = index('', error_code=404, error_info=json.dumps(error_info))
resp.status_code = 404
return resp