Commit af657b05 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets

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

parent 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%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment