Changeset 2699 for pykota/trunk/pykota/storage.py
- Timestamp:
- 02/15/06 23:42:47 (18 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
pykota/trunk/pykota/storage.py
r2697 r2699 49 49 self.Description = str(description) 50 50 self.isDirty = True 51 52 def save(self) : 53 """Saves the object to the database.""" 54 if self.isDirty : 55 getattr(self.parent, "save%s" % self.__class__.__name__[7:])(self) 56 self.isDirty = False 51 57 52 58 class StorageUser(StorageObject) : … … 169 175 else : 170 176 raise AttributeError, name 171 172 def save(self) :173 """Saves the billing code to disk in a single operation."""174 if self.isDirty :175 self.parent.savePrinter(self)176 self.isDirty = False177 177 178 178 def addJobToHistory(self, jobid, user, pagecounter, action, jobsize=None, jobprice=None, filename=None, title=None, copies=None, options=None, clienthost=None, jobsizebytes=None, jobmd5sum=None, jobpages=None, jobbilling=None, precomputedsize=None, precomputedprice=None) : … … 475 475 self.PageCounter = pagecounter 476 476 self.isDirty = True 477 478 def save(self) :479 """Saves the billing code to disk in a single operation."""480 if self.isDirty :481 self.parent.saveBillingCode(self)482 self.isDirty = False483 477 484 478 def consume(self, pages, price) :