Show
Ignore:
Timestamp:
07/04/03 11:06:32 (21 years ago)
Author:
jalet
Message:

Small bug fix wrt undefined "LimitBy?" field.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • pykota/trunk/pykota/tool.py

    r1048 r1061  
    2121# 
    2222# $Log$ 
     23# Revision 1.43  2003/07/04 09:06:32  jalet 
     24# Small bug fix wrt undefined "LimitBy" field. 
     25# 
    2326# Revision 1.42  2003/06/30 12:46:15  jalet 
    2427# Extracted reporting code. 
     
    331334        group = grouppquota.Group 
    332335        printer = grouppquota.Printer 
    333         if group.LimitBy.lower() == "balance" :  
     336        if group.LimitBy and (group.LimitBy.lower() == "balance") :  
    334337            # TODO : there's no warning (no account balance soft limit) 
    335338            if float(group.AccountBalance) <= 0.0 : 
     
    389392        # then we check the user's own quota 
    390393        policy = self.config.getPrinterPolicy(printer.Name) 
    391         if user.LimitBy.lower() == "balance" :  
     394        if user.LimitBy and (user.LimitBy.lower() == "balance") :  
    392395            if user.AccountBalance is None : 
    393396                if policy == "ALLOW" :