Changeset 3541
- Timestamp:
- 04/22/10 11:13:59 (15 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storages/sql.py
r3531 r3541 75 75 """Sets the attributes of a job from a database record.""" 76 76 job.ident = record.get("id") 77 job.JobId = record.get("jobid")77 job.JobId = databaseToUnicode(record.get("jobid")) 78 78 job.PrinterPageCounter = record.get("pagecounter") 79 79 job.JobSize = record.get("jobsize") … … 741 741 % (self.doQuote(user.ident), 742 742 self.doQuote(printer.ident), 743 self.doQuote( jobid),743 self.doQuote(unicodeToDatabase(jobid)), 744 744 self.doQuote(pagecounter), 745 745 self.doQuote(action), … … 761 761 % (self.doQuote(user.ident), 762 762 self.doQuote(printer.ident), 763 self.doQuote( jobid),763 self.doQuote(unicodeToDatabase(jobid)), 764 764 self.doQuote(pagecounter), 765 765 self.doQuote(action), … … 779 779 self.doModify("UPDATE jobhistory SET userid=%s, jobid=%s, pagecounter=%s, action=%s, jobsize=%s, jobprice=%s, filename=%s, title=%s, copies=%s, options=%s, hostname=%s, jobsizebytes=%s, md5sum=%s, pages=%s, billingcode=%s, precomputedjobsize=%s, precomputedjobprice=%s, jobdate=now() WHERE id=%s" \ 780 780 % (self.doQuote(user.ident), 781 self.doQuote( jobid),781 self.doQuote(unicodeToDatabase(jobid)), 782 782 self.doQuote(pagecounter), 783 783 self.doQuote(action), … … 855 855 where.append("billingcode=%s" % self.doQuote(unicodeToDatabase(billingcode))) 856 856 if jobid is not None : 857 where.append("jobid=%s" % self.doQuote( jobid)) # TODO : jobid is text, so unicodeToDatabase(jobid) but do all of them as well.857 where.append("jobid=%s" % self.doQuote(unicodeToDatabase(jobid))) 858 858 if start is not None : 859 859 where.append("jobdate>=%s" % self.doQuote(start))