Fix getting users email and password from the request object

This commit is contained in:
PCoder 2019-04-20 18:52:34 +02:00
parent a1a85e6c18
commit 0b99a0cbec

View file

@ -1284,8 +1284,8 @@ class InvoiceDetailView(LoginRequiredMixin, DetailView):
# fallback to get it from the infrastructure
try:
manager = OpenNebulaManager(
email=self.request.email,
password=self.request.password
email=self.request.user.email,
password=self.request.user.password
)
vm = manager.get_vm(vm_id)
context['vm'] = VirtualMachineSerializer(vm).data