]> source.dussan.org Git - redmine.git/commitdiff
fix awesome_nested_set test failure (#6579)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 26 Mar 2014 11:46:47 +0000 (11:46 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Wed, 26 Mar 2014 11:46:47 +0000 (11:46 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@13014 e93f8b46-1217-0410-a6f0-8f06a7374b81

lib/plugins/awesome_nested_set/lib/awesome_nested_set/awesome_nested_set.rb

index a6c7cf299b14925742a4e02edcbd33898ecacfe0..4cb527762d49b014312c8bb323280893942c2c79 100644 (file)
@@ -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