From c464d65fd4d4ad9c9b68db79cc317d0479fc47f2 Mon Sep 17 00:00:00 2001 From: Vermaas <vermaas@astron.nl> Date: Fri, 14 Apr 2023 14:36:28 +0200 Subject: [PATCH] make plot id unique --- atdb/taskdatabase/services/algorithms.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/atdb/taskdatabase/services/algorithms.py b/atdb/taskdatabase/services/algorithms.py index f9d94082..d55848d5 100644 --- a/atdb/taskdatabase/services/algorithms.py +++ b/atdb/taskdatabase/services/algorithms.py @@ -3,6 +3,7 @@ Author: Nico Vermaas - Astron Description: Business logic for ATDB. These functions are called from the views (views.py). """ +import os import requests import base64 from datetime import datetime, timedelta @@ -724,7 +725,7 @@ def add_plots(task, token, translation, results): collapseable = collapseable.replace('replace_with_basename', basename) collapseable = collapseable.replace('replace_with_image', img_html) collapseable = collapseable.replace('replace_with_url', url) - collapseable = collapseable.replace('replace_with_id', "plot" + str(count)) + collapseable = collapseable.replace('replace_with_id', "plot" + str(task.id)+'_'+str(count)) results += '<tr><td>' + collapseable + '</td></tr>' else: -- GitLab