Commit eb7dae04 authored by Christophe Benz's avatar Christophe Benz
Browse files

Keep dataset_releases as required in English

parent 3603f873
......@@ -116,7 +116,6 @@ def parse_dataset_release(dataset_code: str) -> Tuple[str, Optional[str]]:
def find_dataset_releases(dataset_code_prefix: str, releases_json):
# TODO rename "dataset_releases" to "datasets_releases"
for dataset_releases in releases_json["dataset_releases"]:
if dataset_releases["dataset_code_prefix"] == dataset_code_prefix:
return dataset_releases
......
{
"$schema": "http://json-schema.org/draft-07/schema#",
"title": "Releases",
"description": "Datasets releases",
"description": "Dataset releases",
"type": "object",
"additionalProperties": false,
"properties": {
"datasets_releases": {
"description": "List of datasets releases",
"dataset_releases": {
"description": "List of dataset releases",
"type": "array",
"items": {
"type": "object",
......
......@@ -314,7 +314,7 @@ def validate_category_tree(storage, ignore_errors=[]):
def iter_releases_dataset_code(releases):
"""Yield all dataset codes forged from a releases instance."""
for release in releases.get("datasets_releases", []):
for release in releases.get("dataset_releases", []):
code_prefix = release.get("dataset_code_prefix", "")
for rel in release.get("releases", []):
yield f"{code_prefix}:{rel.get('code', '')}"
......
{
"datasets_releases": [
"dataset_releases": [
{
"dataset_code_prefix": "ewo",
"name": "Ewolving species",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment