Commit e973c650 authored by Igor Drozdov's avatar Igor Drozdov

Return error messages from Validate::Abilities

After Rails 6.1 changes related to ActiveModel errors
the `#add` method doesn't return errors anymore.

Let's just return the errors for backward compatibility
parent fa5043de
......@@ -19,6 +19,8 @@ module Gitlab
# polluted with other unrelated errors (e.g. state machine)
# https://gitlab.com/gitlab-org/gitlab/-/issues/220823
pipeline.errors.add(:base, message)
pipeline.errors.full_messages
end
def warning(message)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment