Changeset 163 for trunk


Ignore:
Timestamp:
Oct 9, 2007, 10:29:20 PM (17 years ago)
Author:
ecprice
Message:

minor bugfix, and check not reusing names.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/web/templates/main.py

    r162 r163  
    584584
    585585def testName(user, name, machine=None):
    586     return name
     586    if Machine.select_by(name=name) == []:
     587        return name
     588    raise InvalidInput('name', name,
     589                       "Already taken")
    587590
    588591def testHostname(user, hostname, machine):
     
    641644    except:
    642645        transaction.rollback()
     646        raise
    643647    remctl("web", "moveregister", oldname, name)
    644648    for disk in machine.disks:
Note: See TracChangeset for help on using the changeset viewer.