diff options
Diffstat (limited to 'app/models/project_services/teamcity_service.rb')
-rw-r--r-- | app/models/project_services/teamcity_service.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/app/models/project_services/teamcity_service.rb b/app/models/project_services/teamcity_service.rb index 29d4236745a..a2d55190de7 100644 --- a/app/models/project_services/teamcity_service.rb +++ b/app/models/project_services/teamcity_service.rb @@ -27,12 +27,10 @@ class TeamcityService < CiService validates :build_type, presence: true, if: :activated? validates :username, presence: true, - if: ->(service) { service.password? }, - if: :activated? + if: ->(service) { service.activated? && service.password? } validates :password, presence: true, - if: ->(service) { service.username? }, - if: :activated? + if: ->(service) { service.activated? && service.username? } attr_accessor :response @@ -147,6 +145,6 @@ class TeamcityService < CiService '</build>', headers: { 'Content-type' => 'application/xml' }, basic_auth: auth - ) + ) end end |