From 92fa77dd07a4749d56c9ea88998350866c47a781 Mon Sep 17 00:00:00 2001
From: imcovangent <I.vanGent@tudelft.nl>
Date: Wed, 30 May 2018 07:50:49 +0200
Subject: [PATCH] Added graph name attribute as this was missing after Database
 loading (and gave problems downstream).

Former-commit-id: ccb62b21e29afd78e0b7f690c3591ceae059eb7e
---
 kadmos/vistoms/vistoms.py | 1 +
 1 file changed, 1 insertion(+)

diff --git a/kadmos/vistoms/vistoms.py b/kadmos/vistoms/vistoms.py
index b85750cae..52835c50e 100644
--- a/kadmos/vistoms/vistoms.py
+++ b/kadmos/vistoms/vistoms.py
@@ -100,6 +100,7 @@ def kadmos_upload_file():
                     dgFile.save(os.path.join(UPLOAD_FOLDER, dgFile.filename))
 
                 loaded_graph = load(graphFileName, file_check_critical=False)
+                loaded_graph.graph["name"] = os.path.splitext(dgFile.filename)[0].replace("_",".")
                 # Remove the uploaded file (and if existing, database directory) from the temp folder
                 os.remove(graphFileName)
                 if os.path.exists(database_dir):
-- 
GitLab