prevent 500 error when selecting changes tab for non-existent branch
This commit is contained in:
parent
0f2bc49474
commit
ba5ba96f2b
|
@ -221,7 +221,7 @@ class MergeRequest < ActiveRecord::Base
|
|||
# true base commit, so we can't simply have `#diff_base_commit` fall back on
|
||||
# this method.
|
||||
def likely_diff_base_commit
|
||||
first_commit.parent || first_commit
|
||||
first_commit.try(:parent) || first_commit
|
||||
end
|
||||
|
||||
def diff_start_commit
|
||||
|
|
Loading…
Reference in New Issue