Changeset 1074 for trunk


Ignore:
Timestamp:
Oct 6, 2008, 4:36:05 AM (16 years ago)
Author:
broder
Message:

Fix a SQLAlchemyism in the web code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/sipb-xen-www/code/controls.py

    r1013 r1074  
    227227    action = fields.getfirst('action')
    228228    cdrom = fields.getfirst('cdrom')
    229     if cdrom is not None and not CDROM.get(cdrom):
     229    if cdrom is not None and not CDROM.query().filter_by(cdrom_id=cdrom).one():
    230230        raise CodeError("Invalid cdrom type '%s'" % cdrom)   
    231231    if action not in ('Reboot', 'Power on', 'Power off', 'Shutdown',
Note: See TracChangeset for help on using the changeset viewer.