From: Eric Price Date: Fri, 9 May 2008 21:14:13 +0000 (-0400) Subject: Default type in info page X-Git-Tag: sipb-xen-www/3.4~12 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-web.git/commitdiff_plain/9d93e8953885dee5fdd5cc11249bbf0faf5e65cc Default type in info page svn path=/trunk/packages/sipb-xen-www/; revision=516 --- diff --git a/code/main.py b/code/main.py index 409433d..e5fdfa9 100755 --- a/code/main.py +++ b/code/main.py @@ -577,8 +577,9 @@ def infoDict(user, machine): checkpoint.checkpoint('Got mem') max_disk = validation.maxDisk(user, machine) defaults = Defaults() - for name in 'machine_id name administrator owner memory contact type'.split(): + for name in 'machine_id name administrator owner memory contact'.split(): setattr(defaults, name, getattr(machine, name)) + defaults.type = machine.type.type_id defaults.disk = "%0.2f" % (machine.disks[0].size/1024.) checkpoint.checkpoint('Got defaults') d = dict(user=user,