Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added license details to dataset object. This is required for migrati… #455

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

## 1.22.1 - 2023-11-10

### Unreleased
- Added License details in dataset object response

### Fixed
- Fixed hearthbeat bug where if the owner was not set in extractors_info.json clowder would throw and error and the
extractor would not get registered.
Expand Down
12 changes: 11 additions & 1 deletion app/models/Dataset.scala
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,17 @@ object Dataset {
"thumbnail" -> datasetThumbnail,
"authorId" -> dataset.author.id,
"spaces" -> dataset.spaces,
"resource_type" -> "dataset")
"resource_type" -> "dataset",
"license" -> Json.obj(
"license_type" -> dataset.licenseData.m_licenseType,
"license_url" -> dataset.licenseData.m_licenseUrl,
"license_text" -> dataset.licenseData.m_licenseText,
"holders" -> dataset.licenseData.m_rightsHolder,
"ccAllowCommercial" -> dataset.licenseData.m_ccAllowCommercial,
"ccAllowDerivative" -> dataset.licenseData.m_ccAllowDerivative,
"ccRequireShareAlike" -> dataset.licenseData.m_ccRequireShareAlike
)
)
}
}
}
Expand Down
Loading