fixup! Fix attr reader to force the intended values for source and target shas

This commit is contained in:
Douglas Barbosa Alexandre 2016-07-31 19:44:02 -03:00
parent 849e8e0c37
commit 285ba1b20f

View file

@ -238,15 +238,11 @@ class MergeRequest < ActiveRecord::Base
end
def target_branch_sha
return @target_branch_sha if defined?(@target_branch_sha)
target_branch_head.try(:sha)
@target_branch_sha || target_branch_head.try(:sha)
end
def source_branch_sha
return @source_branch_sha if defined?(@source_branch_sha)
source_branch_head.try(:sha)
@source_branch_sha || source_branch_head.try(:sha)
end
def diff_refs