Changeset 1999 for pykota

Show
Ignore:
Timestamp:
01/01/05 09:16:17 (20 years ago)
Author:
jalet
Message:

Fixed a problem which occured when 'limitby' was unset in the PostgreSQL
database

Files:
1 modified

Legend:

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

    r1992 r1999  
    2222# 
    2323# $Log$ 
     24# Revision 1.63  2005/01/01 08:16:17  jalet 
     25# Fixed a problem which occured when 'limitby' was unset in the PostgreSQL 
     26# database 
     27# 
    2428# Revision 1.62  2004/12/21 16:19:44  jalet 
    2529# Fixed the problem with dumpykota's filtering of printers groups membership 
     
    262266            user.ident = fields.get("id") 
    263267            user.Name = fields.get("username", username) 
    264             user.LimitBy = fields.get("limitby") 
     268            user.LimitBy = fields.get("limitby") or "quota" 
    265269            user.AccountBalance = fields.get("balance") 
    266270            user.LifeTimePaid = fields.get("lifetimepaid") 
     
    277281            group.ident = fields.get("id") 
    278282            group.Name = fields.get("groupname", groupname) 
    279             group.LimitBy = fields.get("limitby") 
     283            group.LimitBy = fields.get("limitby") or "quota" 
    280284            group.AccountBalance = fields.get("balance") 
    281285            group.LifeTimePaid = fields.get("lifetimepaid") 
     
    363367                user = StorageUser(self, record.get("username")) 
    364368                user.ident = record.get("userid") 
    365                 user.LimitBy = record.get("limitby") 
     369                user.LimitBy = record.get("limitby") or "quota" 
    366370                user.AccountBalance = record.get("balance") 
    367371                user.LifeTimePaid = record.get("lifetimepaid") 
     
    422426                    user = StorageUser(self, record.get("username")) 
    423427                    user.ident = record.get("uid") 
    424                     user.LimitBy = record.get("limitby") 
     428                    user.LimitBy = record.get("limitby") or "quota" 
    425429                    user.AccountBalance = record.get("balance") 
    426430                    user.LifeTimePaid = record.get("lifetimepaid")