Skip to content
Snippets Groups Projects
Commit af657b05 authored by Dmitriy Zaporozhets's avatar Dmitriy Zaporozhets
Browse files

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

parent d3559e25
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment