##// END OF EJS Templates
celery: fix potential 404 problems with celery and sync creation of repositories
marcink -
r2266:8654b9ec stable
parent child Browse files
Show More
@@ -46,11 +46,9 b' class RepoChecksView(BaseAppView):'
46
46
47 repo_name = self.request.matchdict['repo_name']
47 repo_name = self.request.matchdict['repo_name']
48 db_repo = Repository.get_by_repo_name(repo_name)
48 db_repo = Repository.get_by_repo_name(repo_name)
49 if not db_repo:
50 raise HTTPNotFound()
51
49
52 # check if maybe repo is already created
50 # check if maybe repo is already created
53 if db_repo.repo_state in [Repository.STATE_CREATED]:
51 if db_repo and db_repo.repo_state in [Repository.STATE_CREATED]:
54 # re-check permissions before redirecting to prevent resource
52 # re-check permissions before redirecting to prevent resource
55 # discovery by checking the 302 code
53 # discovery by checking the 302 code
56 perm_set = ['repository.read', 'repository.write', 'repository.admin']
54 perm_set = ['repository.read', 'repository.write', 'repository.admin']
General Comments 0
You need to be logged in to leave comments. Login now