diff options
author | Valery Sizov <vsv2711@gmail.com> | 2015-09-11 14:41:26 +0300 |
---|---|---|
committer | Valery Sizov <vsv2711@gmail.com> | 2015-09-11 14:41:26 +0300 |
commit | 77bda265f47763e78ef0a3d4c0e8893e9ecfda69 (patch) | |
tree | dec10fb8104194ace28e90047d6c394d21a1c29d /lib | |
parent | d1914c1e1f4452feae3a29520b6852f7b8009ced (diff) | |
parent | 2ed2ef921026cbde5dddda89177bfa50e2993ecd (diff) | |
download | gitlab-ce-77bda265f47763e78ef0a3d4c0e8893e9ecfda69.tar.gz |
Merge branch 'ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g' of gitlab.com:gitlab-org/gitlab-ce into ci-and-ce-sitting-in-a-tree-k-i-s-s-i-n-g
Diffstat (limited to 'lib')
-rw-r--r-- | lib/api/services.rb | 4 | ||||
-rw-r--r-- | lib/ci/api/projects.rb | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/lib/api/services.rb b/lib/api/services.rb index 73645cedea4..6d2322bb464 100644 --- a/lib/api/services.rb +++ b/lib/api/services.rb @@ -20,7 +20,7 @@ module API end required_attributes! validators.map(&:attributes).flatten.uniq - attrs = attributes_for_keys service_attributes + attrs = attributes_for_keys service_attributes if project_service.update_attributes(attrs.merge(active: true)) true @@ -41,7 +41,7 @@ module API attrs = service_attributes.inject({}) do |hash, key| hash.merge!(key => nil) end - + if project_service.update_attributes(attrs.merge(active: false)) true else diff --git a/lib/ci/api/projects.rb b/lib/ci/api/projects.rb index bdcacecf6ab..556de3bff9f 100644 --- a/lib/ci/api/projects.rb +++ b/lib/ci/api/projects.rb @@ -18,7 +18,7 @@ module Ci project = Ci::Project.find(params[:project_id]) unauthorized! unless current_user.can_manage_project?(project.gitlab_id) - + web_hook = project.web_hooks.new({ url: params[:web_hook] }) if web_hook.save |