Commit b995502d authored by James Lopez's avatar James Lopez

fix MRs, added project restorer spec

parent 54e18d28
......@@ -99,7 +99,7 @@ class MergeRequest < ActiveRecord::Base
validates :merge_user, presence: true, if: :merge_when_pipeline_succeeds?, unless: :importing?
validate :validate_branches, unless: [:allow_broken, :importing?, :closed_without_fork?]
validate :validate_fork, unless: :closed_without_fork?
validate :validate_approvals_before_merge
validate :validate_approvals_before_merge, unless: :importing?
validate :validate_target_project, on: :create
scope :by_source_or_target_branch, ->(branch_name) do
......
......@@ -8,7 +8,6 @@ module EE
prepended do
include Elastic::ProjectsSearch
include Importable
prepend GeoAwareAvatar
prepend ImportStatusStateMachine
......@@ -54,7 +53,7 @@ module EE
validates :repository_size_limit,
numericality: { only_integer: true, greater_than_or_equal_to: 0, allow_nil: true }
validates :approvals_before_merge, numericality: true, allow_blank: true, unless: :importing?
validates :approvals_before_merge, numericality: true, allow_blank: true
accepts_nested_attributes_for :remote_mirrors,
allow_destroy: true,
......
......@@ -2967,7 +2967,8 @@
"action": 1,
"author_id": 1
}
]
],
"approvals_before_merge": 1
},
{
"id": 26,
......
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