diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-14 15:09:03 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-14 15:09:03 +0300 |
commit | 5366964a10484c2783a646b35a6da9eece01b242 (patch) | |
tree | 4a5a7a289d44e63d96a50a6a64db6e16b871f19c /lib/gitlab/ci | |
parent | 733befe96ad19f5a02e442c4a9cc8059d3aabbda (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/ci')
-rw-r--r-- | lib/gitlab/ci/config/entry/needs.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/gitlab/ci/config/entry/needs.rb b/lib/gitlab/ci/config/entry/needs.rb index 5301c453ed4..d7ba8624882 100644 --- a/lib/gitlab/ci/config/entry/needs.rb +++ b/lib/gitlab/ci/config/entry/needs.rb @@ -11,12 +11,14 @@ module Gitlab include ::Gitlab::Config::Entry::Validatable validations do - validates :config, presence: true - validate do unless config.is_a?(Hash) || config.is_a?(Array) errors.add(:config, 'can only be a Hash or an Array') end + + if config.is_a?(Hash) && config.empty? + errors.add(:config, 'can not be an empty Hash') + end end validate on: :composed do |