Skip to content

Commit

Permalink
Added license details to dataset object. This is required for migrati…
Browse files Browse the repository at this point in the history
…ng licenses to v2.
  • Loading branch information
ddey2 committed Aug 30, 2024
1 parent f286139 commit 8db3c60
Showing 1 changed file with 11 additions and 1 deletion.
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

0 comments on commit 8db3c60

Please sign in to comment.