api06: Fix normal way and relation uploading (i.e. not as part of a diff).
(I'm sorry that I couldn't commit it earlier, but I didn't have access to an internet connection until now.)
This commit is contained in:
parent
e7c550cf3f
commit
013ef53c97
2 changed files with 4 additions and 8 deletions
|
@ -17,13 +17,11 @@ class Relation < ActiveRecord::Base
|
|||
doc = p.parse
|
||||
|
||||
doc.find('//osm/relation').each do |pt|
|
||||
relation = Relation.from_xml_node pt, create
|
||||
return Relation.from_xml_node(pt, create)
|
||||
end
|
||||
rescue
|
||||
relation = nil
|
||||
return nil
|
||||
end
|
||||
|
||||
return relation
|
||||
end
|
||||
|
||||
def self.from_xml_node(pt, create=false)
|
||||
|
|
|
@ -18,13 +18,11 @@ class Way < ActiveRecord::Base
|
|||
doc = p.parse
|
||||
|
||||
doc.find('//osm/way').each do |pt|
|
||||
way = Way.from_xml_node pt, create
|
||||
return Way.from_xml_node(pt, create)
|
||||
end
|
||||
rescue
|
||||
way = nil
|
||||
return nil
|
||||
end
|
||||
|
||||
return way
|
||||
end
|
||||
|
||||
def self.from_xml_node(pt, create=false)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue