Skip to content
Snippets Groups Projects
Commit 9a98d684 authored by John Swinbank's avatar John Swinbank Committed by Klaas Kliffen
Browse files

Handle the case where no filepath for a notebook is defined

parent 916d15fe
No related branches found
No related tags found
1 merge request!211Handle the case where no filepath for a notebook is defined
......@@ -149,7 +149,7 @@ class Deploy():
BINDER_REPO_TYPE = "git"
BINDER_REPO_URL = quote_url(workflow.url)
BINDER_REPO_REF = workflow.ref
BINDER_REPO_FILE = quote_url(workflow.filepath)
BINDER_REPO_FILE = quote_url(workflow.filepath) if workflow.filepath else None
# By default, launch into the JupyterLab environment
BINDER_INTERFACE = f"urlpath=lab{'/tree/' + BINDER_REPO_FILE if BINDER_REPO_FILE else ''}"
......@@ -163,7 +163,7 @@ class Deploy():
BINDER_REPO_TYPE = "git"
BINDER_REPO_URL = quote_url(workflow.url)
BINDER_REPO_REF = workflow.ref
BINDER_REPO_FILE = quote_url(workflow.filepath)
BINDER_REPO_FILE = quote_url(workflow.filepath) if workflow.filepath else None
# By default, launch into the JupyterLab environment
BINDER_INTERFACE = f"urlpath=lab{'/tree/' + BINDER_REPO_FILE if BINDER_REPO_FILE else ''}"
......@@ -176,4 +176,3 @@ class Deploy():
#target = facility.url
return redirect(target)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment