From fdcb7646f2f873f9688a3405f0ab418177e6a6bf Mon Sep 17 00:00:00 2001 From: Nico Vermaas <vermaas@astron.nl> Date: Fri, 12 Mar 2021 20:57:31 +0100 Subject: [PATCH] bonus link in dashboard --- atdb/taskdatabase/services/algorithms.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/atdb/taskdatabase/services/algorithms.py b/atdb/taskdatabase/services/algorithms.py index 631e0735..8e501578 100644 --- a/atdb/taskdatabase/services/algorithms.py +++ b/atdb/taskdatabase/services/algorithms.py @@ -202,11 +202,10 @@ def construct_link(request, status, workflow_id, count): link = str(count) try: query = "?status=" + status + "&workflow__id=" + str(workflow_id) - #if settings.DEV == False: - # url = "https://" +request.build_absolute_uri('/atdb/tasks') + query - #else: - #TODO: this doesn't work yet in production - url = request.scheme + "://" + request.get_host() + '/atdb/tasks' + query + if settings.DEV == False: + url = request.build_absolute_uri('/atdb/tasks') + query + else: + url = "https://" + request.get_host() + '/atdb/tasks' + query link = '<a href="' + url + '" target="_blank">' + str(count) + "</a>" except: pass -- GitLab