diff --git a/schemas/base-metadata.schema.ts b/schemas/base-metadata.schema.ts index b9ed45eea..062d1a232 100644 --- a/schemas/base-metadata.schema.ts +++ b/schemas/base-metadata.schema.ts @@ -156,16 +156,21 @@ export const preprocessMetadataSchema = (schema: any = baseMetadataSchema, globa order: ["channel_name", "group_name", "shank_electrode_number", ...UV_PROPERTIES] }) - ecephys.properties["Units"].title = "Summarized Units" - - updateEcephysTable("Units", copy, { - properties: { - clu_id: { - title: 'Cluster ID', - } - }, - order: ["unit_id", "unit_name", "clu_id", "group_id"] - }) + if (ecephys.properties["Units"]) { + + ecephys.properties["Units"].title = "Summarized Units" + + + updateEcephysTable("Units", copy, { + properties: { + clu_id: { + title: 'Cluster ID', + } + }, + order: ["unit_id", "unit_name", "clu_id", "group_id"] + }) + + } } diff --git a/src/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js b/src/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js index 8ea3ee24a..4d39e77af 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js +++ b/src/renderer/src/stories/pages/guided-mode/data/GuidedPathExpansion.js @@ -329,6 +329,8 @@ export class GuidedPathExpansionPage extends Page { await this.form.validate(); + const globalBaseDirectory = this.workflow.base_directory.value; + const finalStructure = {}; for (let key in structure) { const entry = { ...structure[key] }; @@ -337,6 +339,9 @@ export class GuidedPathExpansionPage extends Page { if (fstring.split(".").length > 1) entry.file_path = fstring; else entry.folder_path = fstring; delete entry.format_string_path; + + if (!entry.base_directory && globalBaseDirectory) entry.base_directory = globalBaseDirectory; + finalStructure[key] = entry; }