prevent 500 error when selecting changes tab for non-existent branch

This commit is contained in:
Mike Greiling 2016-12-28 14:01:36 -06:00
parent 0f2bc49474
commit ba5ba96f2b
1 changed files with 1 additions and 1 deletions

View File

@ -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