From 25a37663651122f80cbb6252952cdcb257103366 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lang Date: Fri, 18 Nov 2016 08:46:07 +0000 Subject: [PATCH] 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 --- lib/redmine/nested_set/traversing.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- 2.39.5