Fixed CiServices validation
This commit is contained in:
parent
f479ed3066
commit
9072098215
2 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue