Skip to content

Commit 14b71d9

Browse files
fix: project url
1 parent 558f7af commit 14b71d9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

cads_catalogue_api_service/schema_org.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,9 @@ def schema_org_json_ld(
140140
isPartOf=[
141141
{
142142
"@type": "DataCatalog",
143-
"@id": os.getenv(f"{site.upper()}_PROJECT_URL", None) if site else None,
143+
"@id": f"{os.getenv(f'{site.upper()}_PROJECT_URL', None)}/datasets"
144+
if site
145+
else None,
144146
"name": "ECMWF Data Store",
145147
}
146148
],

tests/test_40_schema_org.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ def test_schema_org_jsonId(monkeypatch) -> None:
105105
"cads_catalogue_api_service.schema_org.query_collection",
106106
static_collection_query,
107107
)
108-
monkeypatch.setenv("CDS_PROJECT_URL", "https://cds.climate.copernicus.eu/datasets")
108+
monkeypatch.setenv("CDS_PROJECT_URL", "https://cds.climate.copernicus.eu")
109109

110110
response = client.get(
111111
"/collections/era5-something/schema.org",

0 commit comments

Comments
 (0)