Changeset 2222

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

Fixed history retrieval for nonexisting printers or users

Location:
pykota/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/NEWS

    r2220 r2222  
    2424    - 1.22alpha8 : 
    2525     
     26        - Fixed history retrieval for nonexisting printers or users. 
     27         
    2628        - Clicking on the billing code in printquota.cgi's job history 
    2729          now shows all jobs matching this billing code. 
  • pykota/trunk/pykota/storages/ldapstorage.py

    r2221 r2222  
    10481048        precond = "(objectClass=pykotaJob)" 
    10491049        where = [] 
    1050         if (user is not None) and user.Exists : 
     1050        if user is not None : 
    10511051            where.append("(pykotaUserName=%s)" % user.Name) 
    1052         if (printer is not None) and printer.Exists : 
     1052        if printer is not None : 
    10531053            where.append("(pykotaPrinterName=%s)" % printer.Name) 
    10541054        if hostname is not None : 
  • 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 :