From ea37ff6834b690b851375ef1568d2cd71880f7bb Mon Sep 17 00:00:00 2001 From: Andy Bayer Roswell Date: Fri, 22 Nov 2024 15:58:25 +0100 Subject: [PATCH] handle JUPYTERHUB_USER in task title --- vreapis/containerizer/views.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/vreapis/containerizer/views.py b/vreapis/containerizer/views.py index 437294f..cc2bcb3 100644 --- a/vreapis/containerizer/views.py +++ b/vreapis/containerizer/views.py @@ -147,8 +147,10 @@ def post(self, request: Request): title = source.partition('\n')[0].strip() title = slugify(title) if title and title[0] == "#" else "Untitled" - if 'JUPYTERHUB_USER' in os.environ: - title += '-' + slugify(os.environ['JUPYTERHUB_USER']) + # if 'JUPYTERHUB_USER' in os.environ: + # title += '-' + slugify(os.environ['JUPYTERHUB_USER']) + if 'JUPYTERHUB_USER' in payload: + title += '-' + slugify(payload['JUPYTERHUB_USER']) # If any of these change, we create a new cell in the catalog. This matches the cell properties saved in workflows. # cell_identity_dict = {'title': title, 'params': extractor.params, 'inputs': extractor.ins, 'outputs': extractor.outs, }