Fix a bug and update delete vm email subject

This commit is contained in:
PCoder 2017-12-20 22:26:36 +01:00
parent 77002a1c9e
commit 2628312bb9

View file

@ -1150,14 +1150,14 @@ class VirtualMachineView(LoginRequiredMixin, View):
email.send()
admin_email_body.update(response)
email_to_admin_data = {
'subject': "Deleted Subscription for VM: {vm_id} and "
'subject': "Deleted VM and Subscription for VM {vm_id} and "
"user: {user}".format(
vm_id=vm.id, user=owner.email
),
'from_email': settings.DCL_SUPPORT_FROM_ADDRESS,
'to': ['info@ungleich.ch'],
'body': "\n".join(
["%s=%s" % (k, v) for (k, v) in admin_email_body]),
["%s=%s" % (k, v) for (k, v) in admin_email_body.items()]),
}
send_plain_email_task.delay(email_to_admin_data)
return HttpResponse(