diff --git a/src/renderer/src/stories/DandiResults.js b/src/renderer/src/stories/DandiResults.js index 86cb1e29b..8f1c4cd52 100644 --- a/src/renderer/src/stories/DandiResults.js +++ b/src/renderer/src/stories/DandiResults.js @@ -36,8 +36,7 @@ export class DandiResults extends LitElement { const otherElIds = ["embargo_status"]; - const liveId = this.id; // '000552' // From Huszar - const dandiset = await get(liveId, isStaging(this.id) ? "staging" : undefined); + const dandiset = await get(this.id, isStaging(this.id) ? "staging" : undefined); otherElIds.forEach((str) => handleId(str, dandiset)); elIds.forEach((str) => handleId(str, dandiset.draft_version)); diff --git a/src/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js b/src/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js index d05b9bcd9..24a9c3f99 100644 --- a/src/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js +++ b/src/renderer/src/stories/pages/guided-mode/options/GuidedUpload.js @@ -17,7 +17,7 @@ export class GuidedUploadPage extends Page { beforeSave = () => { const globalState = this.info.globalState; - const isNewDandiset = globalState.upload.dandiset_id !== this.localState.dandiset_id; + const isNewDandiset = globalState.upload?.dandiset_id !== this.localState.dandiset_id; merge({ upload: this.localState }, globalState); // Merge the local and global states if (isNewDandiset) delete globalState.upload.results; // Clear the preview results entirely if a new dandiset }; @@ -47,21 +47,17 @@ export class GuidedUploadPage extends Page { if (!result || !result.isConfirmed) return this.to(1); } - const results = await uploadToDandi.call(this, { + globalUploadInfo.results = await uploadToDandi.call(this, { ...globalUploadInfo.info, project: globalState.project.name, }); - globalUploadInfo.results = results; // Save the preview results - - this.unsavedUpdates = true; // Ensure that this saves automatically - this.to(1); }, }; render() { - const state = (this.localState = merge(this.info.globalState.upload ?? { info: {}, results: null }, {})); + const state = (this.localState = merge(this.info.globalState.upload ?? { info: {} }, {})); this.form = new JSONSchemaForm({ schema: dandiUploadSchema, diff --git a/src/renderer/src/stories/pages/guided-mode/results/GuidedResults.js b/src/renderer/src/stories/pages/guided-mode/results/GuidedResults.js index 43e5ad642..882041d34 100644 --- a/src/renderer/src/stories/pages/guided-mode/results/GuidedResults.js +++ b/src/renderer/src/stories/pages/guided-mode/results/GuidedResults.js @@ -9,14 +9,14 @@ export class GuidedResultsPage extends Page { } render() { - const { conversion } = this.info.globalState.conversion; + const { conversion } = this.info.globalState; if (!conversion) return html`
Your conversion failed. Please try again.