manage.py vm delete must remove payment as well #38
Labels
No Label
No Milestone
No project
No Assignees
2 Participants
Notifications
Total Time Spent: 2 hours 20 minutes
Due Date
realaravinth
2 hours 20 minutes
No due date set.
Dependencies
No dependencies set.
Reference: Hostea/dashboard#38
Loading…
Reference in New Issue
There is no content yet.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may exist for a short time before cleaning up, in most cases it CANNOT be undone. Continue?
It will fail when run twice because there are leftover from the previous vm and generate_invoice won't send the invoice
This is tricky, I imagine Hostea operators would want to retain payments information for accounting purposes but the current invoice generation implementation is very dependent on the name of the VM.
I'm adding a
vm_deleted
field to the Payments record. When a VM is deleted, all payments made against it will have itsvm_deleted
set to True. And when generating invoices, we'll check for only payments of non-deleted VMs