diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-05 12:10:02 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-05-05 12:10:02 +0300 |
commit | 1c568d834d0cbe1bbbf558ac9a45940f6dbda37a (patch) | |
tree | 0e08971a73035b2ff0b44ef6ff7a2bf48dae7573 /app/models/release.rb | |
parent | 78bc17257c53bc100a4a1eb07c0fdf032236068f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models/release.rb')
-rw-r--r-- | app/models/release.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/models/release.rb b/app/models/release.rb index e18cac4a69a..cf90b07c2a5 100644 --- a/app/models/release.rb +++ b/app/models/release.rb @@ -24,7 +24,7 @@ class Release < ApplicationRecord before_create :set_released_at validates :project, :tag, presence: true - validates :description, length: { maximum: Gitlab::Database::MAX_TEXT_SIZE_LIMIT }, if: :should_validate_description_length? + validates :description, length: { maximum: Gitlab::Database::MAX_TEXT_SIZE_LIMIT }, if: :description_changed? validates_associated :milestone_releases, message: -> (_, obj) { obj[:value].map(&:errors).map(&:full_messages).join(",") } validates :links, nested_attributes_duplicates: { scope: :release, child_attributes: %i[name url filepath] } @@ -102,11 +102,6 @@ class Release < ApplicationRecord private - def should_validate_description_length? - description_changed? && - ::Feature.enabled?(:validate_release_description_length, project, default_enabled: :yaml) - end - def actual_sha sha || actual_tag&.dereferenced_target end |