diff options
author | Ben Bodenmiller <bbodenmiller@hotmail.com> | 2015-04-15 09:11:13 +0300 |
---|---|---|
committer | Ben Bodenmiller <bbodenmiller@hotmail.com> | 2015-04-15 09:11:13 +0300 |
commit | f517dd2606e6d49a447cc952bd4b16ce017f1ddc (patch) | |
tree | 54df669d10673b499391ec9aa0b6f780e6783466 /app | |
parent | 4ab717ea6a65beca3e069ca8590c22c49085dc8c (diff) |
fix stuck mr
fixes #348. related to 6487419364fa9c179e24028d85b2be10d574067f.
Diffstat (limited to 'app')
-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 35cb920d8bc..9c9e2762507 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -361,6 +361,8 @@ class MergeRequest < ActiveRecord::Base end def locked_long_ago? - locked_at && locked_at < (Time.now - 1.day) + return false unless locked? + + locked_at.nil? || locked_at < (Time.now - 1.day) end end |