X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/ff03138a978406b431da71aba64941d87b509098..38e152d784fe0577b07d6f542b44a8d1f5c84371:/app/models/node.rb diff --git a/app/models/node.rb b/app/models/node.rb index dd8d96d12..7db4aed09 100644 --- a/app/models/node.rb +++ b/app/models/node.rb @@ -58,7 +58,7 @@ class Node < ActiveRecord::Base find_by_area(min_lat, min_lon, max_lat, max_lon, :conditions => {:visible => true}, - :limit => APP_CONFIG['max_number_of_nodes']+1) + :limit => MAX_NUMBER_OF_NODES+1) end # Read in xml as text and return it's Node object representation @@ -70,6 +70,7 @@ class Node < ActiveRecord::Base doc.find('//osm/node').each do |pt| return Node.from_xml_node(pt, create) end + raise OSM::APIBadXMLError.new("node", xml, "XML doesn't contain an osm/node element.") rescue LibXML::XML::Error, ArgumentError => ex raise OSM::APIBadXMLError.new("node", xml, ex.message) end