Skip to content

Commit

Permalink
feat: reconcile dataset name if diffs local vs remote
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronm-2112 committed Dec 9, 2024
1 parent d1854d8 commit d49f1ae
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/renderer/src/scripts/guided-mode/guided-curate-dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -5231,7 +5231,19 @@ window.openPage = async (targetPageID) => {
if (pageNeedsUpdateFromPennsieve("guided-name-subtitle-tab")) {
// Show the loading page while the page's data is being fetched from Pennsieve
setPageLoadingState(true);

try {
// get the dataset name from Pennsieve
const datasetResponse = await api.getDatasetInformation(
window.defaultBfAccount,
window.sodaJSONObj["digital-metadata"]["pennsieve-dataset-id"]
);
console.log(datasetResponse);
let datasetName = datasetResponse["content"]["name"];
// Save the dataset name to the JSON and add it to the input
window.sodaJSONObj["digital-metadata"]["name"] = datasetName;
setGuidedDatasetName(datasetName);

//Try to get the dataset name from Pennsieve
//If the request fails, the subtitle input will remain blank
const datasetSubtitle = await api.getDatasetSubtitle(
Expand Down

0 comments on commit d49f1ae

Please sign in to comment.