From: Tony Mack <tmack@paris.CS.Princeton.EDU> Date: Mon, 1 Oct 2012 20:44:05 +0000 (-0400) Subject: fix call to update X-Git-Url: http://git.onelab.eu/?a=commitdiff_plain;h=db8b6abf57fcd960cebb567fa7cea925cb3da7b1;p=plcapi.git fix call to update --- diff --git a/PLC/Addresses.py b/PLC/Addresses.py index fac19f29..0dc0dd30 100644 --- a/PLC/Addresses.py +++ b/PLC/Addresses.py @@ -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)) diff --git a/PLC/ConfFiles.py b/PLC/ConfFiles.py index c753fbfe..4944cdca 100644 --- a/PLC/ConfFiles.py +++ b/PLC/ConfFiles.py @@ -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 diff --git a/PLC/Ilinks.py b/PLC/Ilinks.py index 35b1dbd2..9ccaf606 100644 --- a/PLC/Ilinks.py +++ b/PLC/Ilinks.py @@ -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 diff --git a/PLC/InitScripts.py b/PLC/InitScripts.py index 29a5818d..5b054a8e 100644 --- a/PLC/InitScripts.py +++ b/PLC/InitScripts.py @@ -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