diff --git a/package/kedro_viz/api/rest/router.py b/package/kedro_viz/api/rest/router.py index 15dad02039..c320ff374b 100644 --- a/package/kedro_viz/api/rest/router.py +++ b/package/kedro_viz/api/rest/router.py @@ -62,8 +62,11 @@ async def get_single_pipeline_data(registered_pipeline_id: str): @router.post("/deploy") async def deploy_kedro_viz(input_values: DeployerConfiguration): + # Importing here to avoid circular imports + from kedro_viz.server import load_and_populate_data # pylint: disable=import-outside-toplevel + try: - # load_and_populate_data(Path.cwd(), input_values.preview) + load_and_populate_data(Path.cwd(), input_values.preview) deployer = DeployerFactory.create_deployer( input_values.platform, input_values.endpoint, input_values.bucket_name diff --git a/src/components/shareable-url-modal/shareable-url-modal.js b/src/components/shareable-url-modal/shareable-url-modal.js index 9d58bee238..58c582d4e9 100644 --- a/src/components/shareable-url-modal/shareable-url-modal.js +++ b/src/components/shareable-url-modal/shareable-url-modal.js @@ -104,7 +104,7 @@ const ShareableUrlModal = ({ onToggleModal, visible }) => { 'Content-Type': 'application/json', }, method: 'POST', - body: JSON.stringify(inputValues), + body: JSON.stringify({ ...inputValues, preview: false }), // preview appended to the body to disable the preview data }); const response = await request.json();