Skip to content

Commit

Permalink
Merge branch 'develop' into release/1.50.0
Browse files Browse the repository at this point in the history
  • Loading branch information
andre-urbani committed Nov 1, 2022
2 parents de6992a + cbf0005 commit 5c08005
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions models/metadata.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ type Metadata struct {
CSVHeader []string `json:"headers,omitempty"`
Version int `json:"version,omitempty"`
DatasetLinks *DatasetLinks `json:"dataset_links,omitempty"`
RelatedContent []GeneralDetails `json:"related_content,omitempty"`
}

// MetadataLinks represents a link object to list of metadata relevant to a version
Expand Down Expand Up @@ -134,19 +135,20 @@ func CreateMetaDataDoc(datasetDoc *Dataset, versionDoc *Version, urlBuilder *url
// note: logic to retrieve the newly-added Cantabular-specific fields to the Metadata model will be created at a later date
func CreateCantabularMetaDataDoc(d *Dataset, v *Version, urlBuilder *url.Builder) *Metadata {
m := &Metadata{
CSVHeader: v.Headers,
Description: d.Description,
Dimensions: v.Dimensions,
Downloads: v.Downloads,
Keywords: d.Keywords,
ReleaseDate: v.ReleaseDate,
Title: d.Title,
UnitOfMeasure: d.UnitOfMeasure,
Contacts: d.Contacts,
URI: d.URI,
QMI: d.QMI,
Version: v.Version,
DatasetLinks: d.Links,
CSVHeader: v.Headers,
Description: d.Description,
Dimensions: v.Dimensions,
Downloads: v.Downloads,
Keywords: d.Keywords,
ReleaseDate: v.ReleaseDate,
Title: d.Title,
UnitOfMeasure: d.UnitOfMeasure,
Contacts: d.Contacts,
URI: d.URI,
QMI: d.QMI,
Version: v.Version,
DatasetLinks: d.Links,
RelatedContent: d.RelatedContent,
}

m.Distribution = getDistribution(m.Downloads)
Expand Down

0 comments on commit 5c08005

Please sign in to comment.