From 84dae639686a9b99c624f66a60ae0a08127cd57b Mon Sep 17 00:00:00 2001 From: PCoder Date: Sat, 8 Sep 2018 10:29:47 +0200 Subject: [PATCH] Fix: ugettext_lazy doesn't like string format --- hosting/views.py | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/hosting/views.py b/hosting/views.py index 4e010b3e..33cfc2d8 100644 --- a/hosting/views.py +++ b/hosting/views.py @@ -1431,13 +1431,11 @@ class VirtualMachineView(LoginRequiredMixin, View): else: sleep(2) if not response['status']: - response['text'] = _( - ("VM terminate action timed-out. Please contact support " - "{support_email}" - "for further information.").format( - support_email=settings.DCL_SUPPORT_FROM_ADDRESS - ) - ) + response['text'] = _("VM terminate action timed-out. Please " + "contact support %(support_email)s for " + "further information.") % { + 'support_email': settings.DCL_SUPPORT_FROM_ADDRESS + } context = { 'vm_name': vm_name, 'base_url': "{0}://{1}".format(