Skip to content
Snippets Groups Projects
Commit c4124fce authored by Oswaldo Ferreir's avatar Oswaldo Ferreir
Browse files

Move locked check to a guard-clause

parent 7e60c764
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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?
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment