]> git.openstreetmap.org Git - rails.git/commitdiff
Fixed a problem where rails was setting the ID column to null, which violates the...
authorMatt Amos <zerebubuth@gmail.com>
Sun, 29 Mar 2009 02:14:40 +0000 (02:14 +0000)
committerMatt Amos <zerebubuth@gmail.com>
Sun, 29 Mar 2009 02:14:40 +0000 (02:14 +0000)
app/controllers/amf_controller.rb
app/models/node.rb

index e701f21702cf25a4596c8bf3216ece223d0936bb..1ee5e9cee2b14beacc1552c409694583dd1075c4 100644 (file)
@@ -490,8 +490,8 @@ class AmfController < ApplicationController
       new_relation.changeset_id = changeset_id
       new_relation.version = version
 
-
-      if id <= 0
+      # NOTE: id or relid here? id doesn't seem to be set above
+      if relid <= 0
         # We're creating the node
         new_relation.create_with_history(user)
       elsif visible
index 679048b4e3aa18dc453cde9776410b3b7ba0cb2b..f6726f91a05c730506979e93153c0f1cfca1a2c0 100644 (file)
@@ -171,7 +171,6 @@ class Node < ActiveRecord::Base
   
   def create_with_history(user)
     check_create_consistency(self, user)
-    self.id = nil
     self.version = 0
     self.visible = true