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 e701f21..1ee5e9c 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 679048b..f6726f9 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