Show
Ignore:
Timestamp:
05/06/04 14:37:47 (20 years ago)
Author:
jalet
Message:

pkpgcounter : comments
pkprinters : when --add is used, existing printers are now skipped.

Files:
1 modified

Legend:

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

    r1358 r1451  
    2222# 
    2323# $Log$ 
     24# Revision 1.38  2004/05/06 12:37:47  jalet 
     25# pkpgcounter : comments 
     26# pkprinters : when --add is used, existing printers are now skipped. 
     27# 
    2428# Revision 1.37  2004/02/23 22:53:21  jalet 
    2529# Don't retrieve data when it's not needed, to avoid database queries 
     
    6367            fields = result[0] 
    6468            user.ident = fields.get("id") 
     69            user.Name = fields.get("username", username) 
    6570            user.LimitBy = fields.get("limitby") 
    6671            user.AccountBalance = fields.get("balance") 
     
    7782            fields = result[0] 
    7883            group.ident = fields.get("id") 
     84            group.Name = fields.get("groupname", groupname) 
    7985            group.LimitBy = fields.get("limitby") 
    8086            result = self.doSearch("SELECT SUM(balance) AS balance, SUM(lifetimepaid) AS lifetimepaid FROM users WHERE id IN (SELECT userid FROM groupsmembers WHERE groupid=%s)" % self.doQuote(group.ident)) 
     
    9399            fields = result[0] 
    94100            printer.ident = fields.get("id") 
     101            printer.Name = fields.get("printername", printername) 
    95102            printer.PricePerJob = fields.get("priceperjob") 
    96103            printer.PricePerPage = fields.get("priceperpage")