From 46fe44d698670664f399d71f0e34d60b6c831407 Mon Sep 17 00:00:00 2001 From: vkovtun <viktor.kovtun@id.ethz.ch> Date: Fri, 3 Mar 2023 12:40:04 +0100 Subject: [PATCH] SSDM-13455: Using not only entity name as the file name during export but also code to prevent name collisions. --- .../1/dss/reporting-plugins/exports-api/exportsApi.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui-eln-lims/src/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exportsApi.py b/ui-eln-lims/src/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exportsApi.py index 9565d715b0f..54681f721c1 100644 --- a/ui-eln-lims/src/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exportsApi.py +++ b/ui-eln-lims/src/core-plugins/eln-lims/1/dss/reporting-plugins/exports-api/exportsApi.py @@ -259,11 +259,11 @@ def cleanUp(tempDirPath, tempZipFilePath): FileUtils.forceDelete(File(tempDirPath)); FileUtils.forceDelete(File(tempZipFilePath)); -# Return Name if it exists, otherwise return code +# Return Name (Code) if it exists, otherwise return just Code def extractName(entity): name = None if "$NAME" in entity.getProperties(): - name = entity.getProperties().get("$NAME") + name = entity.getProperties().get("$NAME") + " (" + entity.getCode() + ")" if name is not None and len(name) > 0: return name else: -- GitLab