Revision 4ffb82dc db/models.py

b/db/models.py
503 503
        # FIXME: This must happen inside a transaction.
504 504
        # Debiting the owner of this VM and storing a persistent value
505 505
        # for self.charged must happen ATOMICALLY.
506
        self.owner.debit_account(total_cost, self, description)
507 506
        description = "Server = %d, charge = %d for state: %s" % (self.id, total_cost, self._operstate)
507
        self.owner.debit_account(total_cost, self, description)
508 508
        
509 509
        self.save()
510 510

  
511

  
511 512
class VirtualMachineGroup(models.Model):
512 513
    """Groups of VMs for SynnefoUsers"""
513 514
    name = models.CharField(max_length=255)

Also available in: Unified diff