Remove locked? check when unlocking a merge request
Our state machine shall have enough knowledge to not allow states other than locked from transitioning to opened (e.g. MergeRequest#unlock_mr).
This commit is contained in:
parent
6f0f65becb
commit
d7f61bae8b
|
@ -819,7 +819,7 @@ class MergeRequest < ActiveRecord::Base
|
||||||
lock_mr
|
lock_mr
|
||||||
yield
|
yield
|
||||||
ensure
|
ensure
|
||||||
unlock_mr if locked?
|
unlock_mr
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue