summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-03-26 11:46:47 +0000
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>2014-03-26 11:46:47 +0000
commit2545720afaf4d53c57c2bcda06a60f3e1103729b (patch)
tree68d60b3ccb0bbc33762185d8c3b0808979333f43 /lib
parent971dbfecc004edb3f56030fd5d7409c4c11650e8 (diff)
downloadredmine-2545720afaf4d53c57c2bcda06a60f3e1103729b.tar.gz
redmine-2545720afaf4d53c57c2bcda06a60f3e1103729b.zip
fix awesome_nested_set test failure (#6579)
git-svn-id: http://svn.redmine.org/redmine/trunk@13014 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'lib')
-rw-r--r--lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb b/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
index a6c7cf299..4cb527762 100644
--- a/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
+++ b/lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb
@@ -542,7 +542,7 @@ module CollectiveIdea #:nodoc:
right_most_node =
self.class.base_class.unscoped.
order("#{quoted_right_column_full_name} desc").limit(1).lock(true).first
- right_most_node ? right_most_node[right_column_name] : 0
+ right_most_node ? (right_most_node[right_column_name] || 0) : 0
end
# on creation, set automatically lft and rgt to the end of the tree