diff --git a/endpoints/web.py b/endpoints/web.py index 0f5519f1b..b91e8242e 100644 --- a/endpoints/web.py +++ b/endpoints/web.py @@ -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