From a4e65cd6dfa4c8478abf64195f2ed674fc831d23 Mon Sep 17 00:00:00 2001 From: "usman@cyberpersons.com" Date: Fri, 14 Apr 2023 03:05:55 +0500 Subject: [PATCH] bug fix: for the view when docker is not installed --- dockerManager/decorators.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/dockerManager/decorators.py b/dockerManager/decorators.py index 74645d2de..13762d57e 100755 --- a/dockerManager/decorators.py +++ b/dockerManager/decorators.py @@ -31,7 +31,10 @@ def preDockerRun(function): json_data = json.dumps(data_ret) return HttpResponse(json_data) else: - return render(request, 'dockerManager/install.html', {'status':currentACL['admin'], 'conErr':0}) + from plogical.httpProc import httpProc + proc = httpProc(request, 'dockerManager/install.html', {'status':currentACL['admin'], 'conErr':0}, 'admin') + return proc.render() + #return render(request, 'dockerManager/install.html', {'status':currentACL['admin'], 'conErr':0}) # Check if docker is running and we are able to connect @@ -45,7 +48,11 @@ def preDockerRun(function): json_data = json.dumps(data_ret) return HttpResponse(json_data) else: - return render(request, 'dockerManager/install.html', {'status':currentACL['admin'], 'conErr':1}) + from plogical.httpProc import httpProc + proc = httpProc(request, 'dockerManager/install.html', {'status': currentACL['admin'], 'conErr': 0}, + 'admin') + return proc.render() + #return render(request, 'dockerManager/install.html', {'status':currentACL['admin'], 'conErr':1}) return function(request, *args, **kwargs)