Reformatted hosting views.py

This commit is contained in:
PCoder 2017-09-25 00:46:39 +05:30
parent 83ccb9cffa
commit f2213305f6

View file

@ -49,7 +49,6 @@ from .models import (
)
from datacenterlight.models import VMTemplate
logger = logging.getLogger(__name__)
CONNECTION_ERROR = "Your VMs cannot be displayed at the moment due to a \
@ -1046,7 +1045,8 @@ class VirtualMachineView(LoginRequiredMixin, View):
except WrongIdError:
response['status'] = True
response['text'] = ugettext('Terminated')
vm_detail_obj = VMDetail.objects.filter(vm_id=opennebula_vm_id).first()
vm_detail_obj = VMDetail.objects.filter(
vm_id=opennebula_vm_id).first()
vm_detail_obj.terminated_at = datetime.utcnow()
vm_detail_obj.save()
break