]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/node.rb
various things
[rails.git] / app / models / node.rb
index c37be933a26eef84c2e5c24a45cc7b58b0b4fd32..f184a6ae97d54d4ce00e40a51097345161a1b4ab 100644 (file)
@@ -27,8 +27,10 @@ class Node < ActiveRecord::Base
         return nil
       end
 
-      if pt['id'] != '0'
-        node.id = pt['id'].to_i
+      unless create
+        if pt['id'] != '0'
+          node.id = pt['id'].to_i
+        end
       end
 
       node.visible = pt['visible'] and pt['visible'] == 'true'
@@ -102,5 +104,4 @@ class Node < ActiveRecord::Base
       end
     end
   end
-
 end