Changeset 2371

Show
Ignore:
Timestamp:
07/18/05 16:42:52 (19 years ago)
Author:
jerome
Message:

Minor fixes to ensure that the billing code is stored as utf8

Files:
1 modified

Legend:

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

    r2369 r2371  
    221221        """Extracts a billing code information given its name.""" 
    222222        code = StorageBillingCode(self, label) 
    223         result = self.doSearch("SELECT * FROM billingcodes WHERE billingcode=%s LIMIT 1" % self.doQuote(label)) 
     223        result = self.doSearch("SELECT * FROM billingcodes WHERE billingcode=%s LIMIT 1" % self.doQuote(self.userCharsetToDatabase(label))) 
    224224        if result : 
    225225            fields = result[0] 
    226226            code.ident = fields.get("id") 
    227             code.BillingCode = self.databaseToUserCharset(fields.get("billingcode", label)) 
     227            code.BillingCode = self.databaseToUserCharset(fields.get("billingcode")) 
    228228            code.Description = self.databaseToUserCharset(fields.get("description") or "") 
    229229            code.Balance = fields.get("balance") or 0.0