Commit 8e031ce3 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

Remove requirement for base_commit_sha to allow creation of merge requests for orphaned branches

Signed-off-by: default avatarDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
parent 5cad2d29
...@@ -22,9 +22,8 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -22,9 +22,8 @@ class MergeRequestDiff < ActiveRecord::Base
serialize :st_commits serialize :st_commits
serialize :st_diffs serialize :st_diffs
validates :start_commit_sha, presence: true validates :start_commit_sha, presence: true, unless: :importing?
validates :head_commit_sha, presence: true validates :head_commit_sha, presence: true, unless: :importing?
validates :base_commit_sha, presence: true
after_initialize :set_diff_range, unless: :importing? after_initialize :set_diff_range, unless: :importing?
after_create :save_git_content, unless: :importing? after_create :save_git_content, unless: :importing?
......
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