Commit b1ab1609 authored by Mark Chao's avatar Mark Chao

Avoid race condition of re-triggering mark_as_unchecked

parent a660f548
...@@ -104,8 +104,8 @@ class MergeRequest < ActiveRecord::Base ...@@ -104,8 +104,8 @@ class MergeRequest < ActiveRecord::Base
state_machine :merge_status, initial: :unchecked do state_machine :merge_status, initial: :unchecked do
event :mark_as_unchecked do event :mark_as_unchecked do
transition [:can_be_merged] => :unchecked transition [:can_be_merged, :unchecked] => :unchecked
transition [:cannot_be_merged] => :cannot_be_merged_recheck transition [:cannot_be_merged, :cannot_be_merged_recheck] => :cannot_be_merged_recheck
end end
event :mark_as_mergeable do event :mark_as_mergeable do
......
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