]> source.dussan.org Git - redmine.git/commitdiff
graft r5285 to awesome_nested_set 2.1.5 (#7920)
authorToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 21 Jan 2014 06:51:22 +0000 (06:51 +0000)
committerToshi MARUYAMA <marutosijp2@yahoo.co.jp>
Tue, 21 Jan 2014 06:51:22 +0000 (06:51 +0000)
git-svn-id: http://svn.redmine.org/redmine/trunk@12685 e93f8b46-1217-0410-a6f0-8f06a7374b81

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

index b101a5ef24df42400cf50ea3d557d56193081fc8..797ce2ab5fda0556e335c9bc8811b9530b72c511 100644 (file)
@@ -590,6 +590,8 @@ module CollectiveIdea #:nodoc:
               ["#{quoted_right_column_name} = (#{quoted_right_column_name} - ?)", diff]
             )
 
+            # Reload is needed because children may have updated their parent (self) during deletion.
+            reload
             # Don't allow multiple calls to destroy to corrupt the set
             self.skip_before_destroy = true
           end