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:
Oswaldo Ferreira 2017-08-10 16:16:43 -03:00
parent 6f0f65becb
commit d7f61bae8b
1 changed files with 1 additions and 1 deletions

View File

@ -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