diff options
Diffstat (limited to 'app/models/release.rb')
-rw-r--r-- | app/models/release.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/models/release.rb b/app/models/release.rb index 2b82fdc37f6..60c2abcacb3 100644 --- a/app/models/release.rb +++ b/app/models/release.rb @@ -24,6 +24,7 @@ class Release < ApplicationRecord validates :project, :tag, presence: true 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] } scope :sorted, -> { order(released_at: :desc) } scope :preloaded, -> { includes(:evidences, :milestones, project: [:project_feature, :route, { namespace: :route }]) } |