]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/relation.rb
Added a bunch more tests on the API 0.6. Fixed node/way/relation from_xml code to...
[rails.git] / app / models / relation.rb
index 195090e4b1f2755593773bc1fafb4755c0f37e6d..436c1e32ef8693bf068429743000b38cfe8f4546 100644 (file)
@@ -182,6 +182,11 @@ class Relation < ActiveRecord::Base
 
   def add_tag_keyval(k, v)
     @tags = Hash.new unless @tags
+
+    # duplicate tags are now forbidden, so we can't allow values
+    # in the hash to be overwritten.
+    raise OSM::APIDuplicateTagsError.new if @tags.include? k
+
     @tags[k] = v
   end