From 8615dc0bcec56803836d8c906e4e83fbab76cf6d Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Sat, 21 Jan 2017 10:10:24 +0000 Subject: [PATCH] Use #none for empty scope. git-svn-id: http://svn.redmine.org/redmine/trunk@16247 e93f8b46-1217-0410-a6f0-8f06a7374b81 --- app/models/issue.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/issue.rb b/app/models/issue.rb index 40a12c0ca..1877ca2c9 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -89,7 +89,7 @@ class Issue < ActiveRecord::Base } scope :fixed_version, lambda {|versions| ids = [versions].flatten.compact.map {|v| v.is_a?(Version) ? v.id : v} - ids.any? ? where(:fixed_version_id => ids) : where('1=0') + ids.any? ? where(:fixed_version_id => ids) : none } scope :assigned_to, lambda {|arg| arg = Array(arg).uniq -- 2.39.5