There was an error while loading. Please reload this page.
1 parent e198e6e commit 330544eCopy full SHA for 330544e
1 file changed
quadriga/metadata/utils.py
@@ -552,15 +552,15 @@ def get_content_license(metadata: dict) -> str | None:
552
"""
553
license_data = metadata.get("license")
554
if isinstance(license_data, str):
555
- return license_data
+ return license_data.replace(" ", "-")
556
if isinstance(license_data, dict) and "content" in license_data:
557
content = license_data["content"]
558
if isinstance(content, str):
559
- return content
+ return content.replace(" ", "-")
560
if isinstance(content, dict) and "name" in content:
561
- return str(content["name"])
+ return str(content["name"]).replace(" ", "-")
562
if isinstance(content, list) and content:
563
- return str(content[0])
+ return str(content[0]).replace(" ", "-")
564
return None
565
566
0 commit comments