]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/relation.rb
Fixed a couple of bugs with changeset bounding box calculation when modifying or...
[rails.git] / app / models / relation.rb
index c3769b14d68e2a126d2f54002e746127bc61d80d..4b5d9e32b89ac90832e674e5434e328e1e0f92bc 100644 (file)
@@ -253,6 +253,7 @@ class Relation < ActiveRecord::Base
       raise OSM::APIPreconditionFailedError.new
     end
     self.changeset_id = new_relation.changeset_id
       raise OSM::APIPreconditionFailedError.new
     end
     self.changeset_id = new_relation.changeset_id
+    self.changeset = new_relation.changeset
     self.tags = new_relation.tags
     self.members = new_relation.members
     self.visible = true
     self.tags = new_relation.tags
     self.members = new_relation.members
     self.visible = true
@@ -372,6 +373,10 @@ class Relation < ActiveRecord::Base
         tag.id = self.id
         tag.save!
       end
         tag.id = self.id
         tag.save!
       end
+      
+      # reload, so that all of the members are accessible in their
+      # new state.
+      self.reload
 
       # same pattern as before, but this time we're collecting the
       # changed members in an array, as the bounding box updates for
 
       # same pattern as before, but this time we're collecting the
       # changed members in an array, as the bounding box updates for