X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/blobdiff_plain/f9904f2409d8fdc314676c624a414c27170c1551..47b9cb0d87524e6598da025f3c49cd013f00606b:/code/main.py?ds=inline diff --git a/code/main.py b/code/main.py index b443640..b712696 100755 --- a/code/main.py +++ b/code/main.py @@ -286,7 +286,7 @@ console will suffer artifacts. machine_id=machine_id).machine d = infoDict(cherrypy.request.login, cherrypy.request.state, machine) return d - index = list + index = info @cherrypy.expose @cherrypy.tools.mako(filename="/info.mako") @@ -549,7 +549,7 @@ def modifyDict(username, state, machine_id, fields): if hasattr(validate, 'contact'): machine.contact = validate.contact - session.save_or_update(machine) + session.add(machine) session.commit() except: session.rollback() @@ -563,10 +563,10 @@ def modifyDict(username, state, machine_id, fields): if disk.size != disksize: olddisk[disk.guest_device_name] = disksize disk.size = disksize - session.save_or_update(disk) + session.add(disk) for diskname in olddisk: controls.resizeDisk(oldname, diskname, str(olddisk[diskname])) - session.save_or_update(machine) + session.add(machine) session.commit() except: session.rollback() @@ -581,7 +581,7 @@ def modifyDict(username, state, machine_id, fields): n.hostname = validate.name if hasattr(validate, 'name'): controls.renameMachine(machine, oldname, validate.name) - session.save_or_update(machine) + session.add(machine) session.commit() except: session.rollback()