Skip to content

Commit

Permalink
Fix for 'Export metadata' show/hide logic
Browse files Browse the repository at this point in the history
Before this change, the export metadata button was showing up even though
the dataset config had include_metadata_export set to false. The JS was
updated to prioritise dataset-level config rather than catalog-level config.
  • Loading branch information
jsheunis committed Jun 6, 2024
1 parent c5ec34c commit f9d5b50
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions catalog/assets/app_component_dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,12 +209,14 @@ const datasetView = () =>
dataset.access_request_contact.familyName;
}
// Rendering options for dataset page
if (this.$root.hasOwnProperty("dataset_options") && this.$root.dataset_options.hasOwnProperty("include_metadata_export")) {
disp_dataset.show_export = this.$root.dataset_options.include_metadata_export
if (dataset.config?.hasOwnProperty("dataset_options") && dataset.config.dataset_options.hasOwnProperty("include_metadata_export")) {
disp_dataset.show_export = dataset.config.dataset_options.include_metadata_export
}
else {
disp_dataset.show_export = false
}
console.debug("disp_dataset.show_export")
console.debug(disp_dataset.show_export)
// Determine show/hide confirg for "Request access" button
if (dataset.config?.hasOwnProperty("dataset_options") && dataset.config.dataset_options.hasOwnProperty("include_access_request")) {
disp_dataset.show_access_request = dataset.config.dataset_options.include_access_request
Expand Down

0 comments on commit f9d5b50

Please sign in to comment.