Show
Ignore:
Timestamp:
04/29/05 10:00:06 (19 years ago)
Author:
jerome
Message:

Fixed history retrieval for nonexisting printers or users

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/storages/sql.py

    r2220 r2222  
    502502        query = "SELECT jobhistory.*,username,printername FROM jobhistory,users,printers WHERE users.id=userid AND printers.id=printerid" 
    503503        where = [] 
    504         if (user is not None) and user.Exists : 
     504        if user is not None : # user.ident is None anyway if user doesn't exist 
    505505            where.append("userid=%s" % self.doQuote(user.ident)) 
    506         if (printer is not None) and printer.Exists : 
     506        if printer is not None : # printer.ident is None anyway if printer doesn't exist 
    507507            where.append("printerid=%s" % self.doQuote(printer.ident)) 
    508508        if hostname is not None :