Show
Ignore:
Timestamp:
04/10/06 10:18:44 (18 years ago)
Author:
jerome
Message:

Initializes the denied banners counter in all cases.

Files:
1 modified

Legend:

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

    r2830 r2857  
    274274                userpquota.HardLimit = fields.get("hardlimit") 
    275275                userpquota.DateLimit = fields.get("datelimit") 
    276                 userpquota.WarnCount = fields.get("warncount") 
     276                userpquota.WarnCount = fields.get("warncount") or 0 
    277277                userpquota.Exists = 1 
    278278        return userpquota 
     
    513513                    userpquota.HardLimit = record.get("hardlimit") 
    514514                    userpquota.DateLimit = record.get("datelimit") 
    515                     userpquota.WarnCount = record.get("warncount") 
     515                    userpquota.WarnCount = record.get("warncount") or 0 
    516516                    userpquota.Exists = 1 
    517517                    usersandquotas.append((user, userpquota)) 
     
    618618                             self.doQuote(upq.SoftLimit), \ 
    619619                             self.doQuote(upq.HardLimit), \ 
    620                              self.doQuote(upq.WarnCount), \ 
     620                             self.doQuote(upq.WarnCount or 0), \ 
    621621                             self.doQuote(upq.DateLimit), \ 
    622622                             self.doQuote(upq.PageCounter or 0), \ 
     
    731731                              % (self.doQuote(userpquota.SoftLimit), \ 
    732732                                 self.doQuote(userpquota.HardLimit), \ 
    733                                  self.doQuote(userpquota.WarnCount), \ 
     733                                 self.doQuote(userpquota.WarnCount or 0), \ 
    734734                                 self.doQuote(userpquota.DateLimit), \ 
    735735                                 self.doQuote(userpquota.PageCounter or 0), \