fix call to update
authorTony Mack <tmack@paris.CS.Princeton.EDU>
Mon, 1 Oct 2012 20:44:05 +0000 (16:44 -0400)
committerTony Mack <tmack@paris.CS.Princeton.EDU>
Mon, 1 Oct 2012 20:44:05 +0000 (16:44 -0400)
PLC/Addresses.py
PLC/ConfFiles.py
PLC/Ilinks.py
PLC/InitScripts.py

index fac19f2..0dc0dd3 100644 (file)
@@ -81,7 +81,7 @@ class Address(AlchemyObj):
         if insert == True or 'id' not in self:
             AlchemyObj.insert(self, dict(self))
         else:
-            AlchemyObj.update(self, dict(self))
+            AlchemyObj.update(self, {'address_id': self['address_id']}, dict(self))
 
     def delete(self, commit=True):
         AlchemyObj.delete(self, dict(self))     
index c753fbf..4944cdc 100644 (file)
@@ -135,7 +135,7 @@ class ConfFile(AlchemyObj):
         if 'conf_file_id' not in self:
             AlchemyObj.insert(self, dict(self))
         else:
-            AlchemyObj.update(self, self['conf_file_id'], dict(self))
+            AlchemyObj.update(self, {'conf_file_id': self['conf_file_id']}, dict(self))
 
     def delete(self, commit=True):
         assert 'conf_file_id' in self
index 35b1dbd..9ccaf60 100644 (file)
@@ -27,7 +27,7 @@ class Ilink(AlchemyObj):
         if 'ilink_id' in self:
             AlchemyObj.insert(self, dict(self))
         else:
-            AlchemyObj.update(self, self['ilink_id'], dict(self))
+            AlchemyObj.update(self, {'ilink_id': self['ilink_id']}, dict(self))
 
     def delete(self, commit=True):
         assert 'ilink_id' in self
index 29a5818..5b054a8 100644 (file)
@@ -42,7 +42,7 @@ class InitScript(AlchemyObj):
         if 'initscript_id' not in self:
             AlchemyObj.insert(self, dict(self))
         else:
-            AlchemyObj.update(self, self['initscript_id'], dict(self))
+            AlchemyObj.update(self, {'initscript_id': self['initscript_id']}, dict(self))
 
     def delete(self, commit=True):
         assert 'initscript_id' in self