diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-28 19:22:45 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2013-01-28 19:22:45 +0400 |
commit | 1c5876eb7b2deb069d919bd19b51c9f6218e0f41 (patch) | |
tree | 0d93953103153bcadc96ee9688a1cca43a9711a0 /app/contexts | |
parent | b4f16faafd5bff1683996152b49342743a0f1a8b (diff) |
Do gitolite calls async. Remove satellite with project remove
Diffstat (limited to 'app/contexts')
-rw-r--r-- | app/contexts/projects/create_context.rb | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/app/contexts/projects/create_context.rb b/app/contexts/projects/create_context.rb index e644d89a356..915bd8be8b0 100644 --- a/app/contexts/projects/create_context.rb +++ b/app/contexts/projects/create_context.rb @@ -32,16 +32,10 @@ module Projects @project.namespace_id = current_user.namespace_id end - Project.transaction do - @project.creator = current_user - @project.save! + @project.creator = current_user - # Add user as project master - @project.users_projects.create!(project_access: UsersProject::MASTER, user: current_user) - - # when project saved no team member exist so - # project repository should be updated after first user add - @project.update_repository + if @project.save + @project.users_projects.create(project_access: UsersProject::MASTER, user: current_user) end @project |