diff options
author | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-08-10 16:16:43 -0300 |
---|---|---|
committer | Oswaldo Ferreira <oswaldo@gitlab.com> | 2017-08-28 15:48:09 -0300 |
commit | d7f61bae8b498a09180bb7e782a687ae2d0c3bae (patch) | |
tree | a03306f9e875757b3ec63347a14f510e1e2ce890 /app | |
parent | 6f0f65becbbe968bd26a5a3872044d7b8633bf2e (diff) | |
download | gitlab-ce-d7f61bae8b498a09180bb7e782a687ae2d0c3bae.tar.gz |
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).
Diffstat (limited to 'app')
-rw-r--r-- | app/models/merge_request.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index dbc73ed3cd4..e283c3981a4 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -819,7 +819,7 @@ class MergeRequest < ActiveRecord::Base lock_mr yield ensure - unlock_mr if locked? + unlock_mr end end |