]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
We don't need an extra method for the amf controller for saving nodes, just catch...
[rails.git] / app / models / node.rb
index 2c25bbd14cc72cd268c3c078b92b829c1b8dae87..d85b22c9b11ddcaad04e901fe2d9bfd7f677f4fb 100644 (file)
@@ -137,7 +137,7 @@ class Node < ActiveRecord::Base
       
       rel = RelationMember.find(:first, :joins => "INNER JOIN current_relations ON current_relations.id=current_relation_members.id", 
                                 :conditions => [ "visible = ? AND member_type='Node' and member_id=? ", true, self.id])
-      raise OSM::APIPreconditionFailedError.new("Node #{self.id} is still used by relation #{rel.id}.") unless rel.nil?
+      raise OSM::APIPreconditionFailedError.new("Node #{self.id} is still used by relation #{rel.relation.id}.") unless rel.nil?
 
       self.changeset_id = new_node.changeset_id
       self.visible = false