Commit 2823d270 authored by Dylan Griffith's avatar Dylan Griffith

Remove unecessary validate: true from belongs_to :project

This does not seem to serve any clear purpose and causes other issues (see https://gitlab.com/gitlab-org/gitlab-ce/issues/43196#note_59275652)
parent 1192526b
class Deployment < ActiveRecord::Base
include InternalId
belongs_to :project, required: true, validate: true
belongs_to :environment, required: true, validate: true
belongs_to :project, required: true
belongs_to :environment, required: true
belongs_to :user
belongs_to :deployable, polymorphic: true # rubocop:disable Cop/PolymorphicAssociations
......
......@@ -4,7 +4,7 @@ class Environment < ActiveRecord::Base
NUMBERS = '0'..'9'
SUFFIX_CHARS = LETTERS.to_a + NUMBERS.to_a
belongs_to :project, required: true, validate: true
belongs_to :project, required: true
has_many :deployments, dependent: :destroy # rubocop:disable Cop/ActiveRecordDependent
......
---
title: 'Remove unecessary validate: true from belongs_to :project'
merge_request:
author:
type: fixed
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