diff options
author | Gabriel Mazetto <gabriel@gitlab.com> | 2015-12-15 22:37:23 +0300 |
---|---|---|
committer | Gabriel Mazetto <gabriel@gitlab.com> | 2015-12-15 22:37:23 +0300 |
commit | 907209821590efc34b11b60a042c6554bd11897f (patch) | |
tree | 281e4cf0ee88e12e58ddc1f210cd94390ff54312 | |
parent | f479ed306647bad84f3870f263f946646bb3f477 (diff) |
Fixed CiServices validation
-rw-r--r-- | app/models/project_services/bamboo_service.rb | 4 | ||||
-rw-r--r-- | app/models/project_services/teamcity_service.rb | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/app/models/project_services/bamboo_service.rb b/app/models/project_services/bamboo_service.rb index 73f99b229f2..aa8746beb80 100644 --- a/app/models/project_services/bamboo_service.rb +++ b/app/models/project_services/bamboo_service.rb @@ -27,10 +27,10 @@ class BambooService < CiService validates :build_key, presence: true, if: :activated? validates :username, presence: true, - if: ->(service) { service.activated? && service.password? } + if: ->(service) { service.activated? && service.password } validates :password, presence: true, - if: ->(service) { service.activated? && service.username? } + if: ->(service) { service.activated? && service.username } attr_accessor :response diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb index a2d55190de7..a63700693d7 100644 --- a/app/models/project_services/teamcity_service.rb +++ b/app/models/project_services/teamcity_service.rb @@ -27,10 +27,10 @@ class TeamcityService < CiService validates :build_type, presence: true, if: :activated? validates :username, presence: true, - if: ->(service) { service.activated? && service.password? } + if: ->(service) { service.activated? && service.password } validates :password, presence: true, - if: ->(service) { service.activated? && service.username? } + if: ->(service) { service.activated? && service.username } attr_accessor :response |