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

parent 849e8e0c
...@@ -238,15 +238,11 @@ class MergeRequest < ActiveRecord::Base ...@@ -238,15 +238,11 @@ class MergeRequest < ActiveRecord::Base
end end
def target_branch_sha def target_branch_sha
return @target_branch_sha if defined?(@target_branch_sha) @target_branch_sha || target_branch_head.try(:sha)
target_branch_head.try(:sha)
end end
def source_branch_sha def source_branch_sha
return @source_branch_sha if defined?(@source_branch_sha) @source_branch_sha || source_branch_head.try(:sha)
source_branch_head.try(:sha)
end end
def diff_refs def diff_refs
......
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