Commit 0b688341 authored by Mark Chao's avatar Mark Chao

Avoid race condition of re-triggering mark_as_unchecked

parent 1e9838da
...@@ -108,8 +108,8 @@ class MergeRequest < ActiveRecord::Base ...@@ -108,8 +108,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