Changeset 1228

Show
Ignore:
Timestamp:
11/29/03 23:02:14 (20 years ago)
Author:
jalet
Message:

Don't try to retrieve the user print quota information if current printer
doesn't exist.

Location:
pykota/trunk/pykota/storages
Files:
2 modified

Legend:

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

    r1224 r1228  
    2222# 
    2323# $Log$ 
     24# Revision 1.40  2003/11/29 22:02:14  jalet 
     25# Don't try to retrieve the user print quota information if current printer 
     26# doesn't exist. 
     27# 
    2428# Revision 1.39  2003/11/26 23:35:32  jalet 
    2529# Added a bit of code to support the setting of the user's email address 
     
    345349        """Extracts a user print quota.""" 
    346350        userpquota = StorageUserPQuota(self, user, printer) 
    347         if user.Exists : 
     351        if printer.Exists and user.Exists : 
    348352            result = self.doSearch("(&(objectClass=pykotaUserPQuota)(pykotaUserName=%s)(pykotaPrinterName=%s))" % (user.Name, printer.Name), ["pykotaPageCounter", "pykotaLifePageCounter", "pykotaSoftLimit", "pykotaHardLimit", "pykotaDateLimit"], base=self.info["userquotabase"]) 
    349353            if result : 
  • pykota/trunk/pykota/storages/pgstorage.py

    r1203 r1228  
    2222# 
    2323# $Log$ 
     24# Revision 1.24  2003/11/29 22:02:14  jalet 
     25# Don't try to retrieve the user print quota information if current printer 
     26# doesn't exist. 
     27# 
    2428# Revision 1.23  2003/11/23 19:01:37  jalet 
    2529# Job price added to history 
     
    250254        """Extracts a user print quota.""" 
    251255        userpquota = StorageUserPQuota(self, user, printer) 
    252         if user.Exists : 
     256        if printer.Exists and user.Exists : 
    253257            result = self.doSearch("SELECT id, lifepagecounter, pagecounter, softlimit, hardlimit, datelimit FROM userpquota WHERE userid=%s AND printerid=%s" % (self.doQuote(user.ident), self.doQuote(printer.ident))) 
    254258            if result :