提交 af657b05 编写于 作者: D Dmitriy Zaporozhets

reset st_commits before setting new value to prevent error when old st_commits is broken

上级 d3559e25
......@@ -172,6 +172,12 @@ class MergeRequest < ActiveRecord::Base
def reloaded_commits
if opened? && unmerged_commits.any?
# we need to reset st_commits field first
# in order to prevent internal rails comparison
self.st_commits = []
save
# Then we can safely write unmerged commits
self.st_commits = unmerged_commits
save
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册