diff options
Diffstat (limited to 'app/models/issue.rb')
-rw-r--r-- | app/models/issue.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 6e69b5560..31d2f75dd 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -1018,7 +1018,7 @@ class Issue < ActiveRecord::Base # Returns true if this issue is blocked by another issue that is still open def blocked? - !relations_to.detect {|ir| ir.relation_type == 'blocks' && !ir.issue_from.closed?}.nil? + relations_to.any? {|ir| ir.relation_type == 'blocks' && ir.issue_from&.closed? == false} end # Returns true if this issue can be closed and if not, returns false and populates the reason |