Changeset 2369
- Timestamp:
- 07/18/05 16:07:01 (19 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/sql.py
r2342 r2369 225 225 fields = result[0] 226 226 code.ident = fields.get("id") 227 code.BillingCode = fields.get("billingcode", label)227 code.BillingCode = self.databaseToUserCharset(fields.get("billingcode", label)) 228 228 code.Description = self.databaseToUserCharset(fields.get("description") or "") 229 229 code.Balance = fields.get("balance") or 0.0 … … 361 361 if result : 362 362 for record in result : 363 if self.tool.matchString(record["billingcode"], billingcodepattern.split(",")) : 364 code = StorageBillingCode(self, record["billingcode"]) 363 bcode = self.databaseToUserCharset(record["billingcode"]) 364 if self.tool.matchString(bcode, billingcodepattern.split(",")) : 365 code = StorageBillingCode(self, bcode) 365 366 code.ident = record.get("id") 366 367 code.Balance = record.get("balance") or 0.0 … … 420 421 def addBillingCode(self, label) : 421 422 """Adds a billing code to the quota storage, returns it.""" 422 self.doModify("INSERT INTO billingcodes (billingcode) VALUES (%s)" % self.doQuote( label))423 self.doModify("INSERT INTO billingcodes (billingcode) VALUES (%s)" % self.doQuote(self.userCharsetToDatabase(label))) 423 424 return self.getBillingCode(label) 424 425 … … 659 660 ] : 660 661 self.doModify(q) 661 662 662