- node = Node.find(:first, :conditions => ["id = ?", n])
- unless node and node.visible
- raise OSM::APIPreconditionFailedError.new("Way #{self.id} requires the node with id #{n}, which either does not exist, or is not visible.")
+ unless checked.key? n
+ node = Node.find(:first, :conditions => ["id = ?", n])
+ unless node and node.visible
+ raise OSM::APIPreconditionFailedError.new("Way #{self.id} requires the node with id #{n}, which either does not exist, or is not visible.")
+ end
+ checked[n] = true