summaryrefslogtreecommitdiffstats
path: root/lib/redmine/nested_set
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-18 08:46:07 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2016-11-18 08:46:07 +0000
commit25a37663651122f80cbb6252952cdcb257103366 (patch)
tree336838b4716a107e5ca164b5583e2e771003884a /lib/redmine/nested_set
parentfcbd06e09069160a31bb70d3514383fea1e2b7f0 (diff)
downloadredmine-25a37663651122f80cbb6252952cdcb257103366.tar.gz
redmine-25a37663651122f80cbb6252952cdcb257103366.zip
Add tablename to siblings query (#24296).
Patch by Danil Tashkinov. git-svn-id: http://svn.redmine.org/redmine/trunk@15958 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib/redmine/nested_set')
-rw-r--r--lib/redmine/nested_set/traversing.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/redmine/nested_set/traversing.rb b/lib/redmine/nested_set/traversing.rb
index 5b3c1cb14..67b13d779 100644
--- a/lib/redmine/nested_set/traversing.rb
+++ b/lib/redmine/nested_set/traversing.rb
@@ -61,7 +61,7 @@ module Redmine
# Returns the siblings
def siblings
- nested_set_scope.where(:parent_id => parent_id).where("id <> ?", id)
+ nested_set_scope.where(:parent_id => parent_id).where("#{self.class.table_name}.id <> ?", id)
end
# Returns the ancestors