Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-01-31 12:07:35 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-01-31 12:07:35 +0300
commitaa88b9053d72f3f9b69ae5365b77595dcae5c0c3 (patch)
treeaa697939b0ea8a5333d13e92d0bc961bfff6ada7 /app/models
parente6c495fe40320eb01bf8c4fb132c9f22449ae9d2 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/models')
-rw-r--r--app/models/release.rb3
1 files changed, 1 insertions, 2 deletions
diff --git a/app/models/release.rb b/app/models/release.rb
index b770f3934ef..85699d259f5 100644
--- a/app/models/release.rb
+++ b/app/models/release.rb
@@ -11,7 +11,6 @@ class Release < ApplicationRecord
cache_markdown_field :description
belongs_to :project, touch: true
- # releases prior to 11.7 have no author
belongs_to :author, class_name: 'User'
has_many :links, class_name: 'Releases::Link'
@@ -26,7 +25,7 @@ class Release < ApplicationRecord
before_create :set_released_at
validates :project, :tag, presence: true
- validates :author_id, presence: true, if: :validate_release_with_author?
+ validates :author_id, presence: true, on: :create, if: :validate_release_with_author?
validates :tag, uniqueness: { scope: :project_id }