diff options
Diffstat (limited to 'app/models/merge_request.rb')
-rw-r--r-- | app/models/merge_request.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index c952ab862d7..07352db5d2d 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -398,7 +398,9 @@ class MergeRequest < ActiveRecord::Base def merge_ongoing? # While the MergeRequest is locked, it should present itself as 'merge ongoing'. # The unlocking process is handled by StuckMergeJobsWorker scheduled in Cron. - locked? || !!merge_jid && !merged? && Gitlab::SidekiqStatus.running?(merge_jid) + return true if locked? + + !!merge_jid && !merged? && Gitlab::SidekiqStatus.running?(merge_jid) end def closed_without_fork? |