From d23bcd639b36f4b69137d31947bc0976652130bb Mon Sep 17 00:00:00 2001 From: Alejandro Villar Date: Fri, 12 Jan 2024 10:49:33 +0100 Subject: [PATCH] Fix missing register name --- ogc/bblocks/entrypoint.py | 3 +++ ogc/bblocks/postprocess.py | 7 ++++--- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/ogc/bblocks/entrypoint.py b/ogc/bblocks/entrypoint.py index d1df673..ecf6d2e 100644 --- a/ogc/bblocks/entrypoint.py +++ b/ogc/bblocks/entrypoint.py @@ -176,6 +176,9 @@ register_description = bb_config.get('description') if register_description: register_additional_metadata['description'] = register_description + register_name = bb_config.get('name') + if register_name: + register_additional_metadata['name'] = register_name base_url = args.base_url github_base_url = args.github_base_url diff --git a/ogc/bblocks/postprocess.py b/ogc/bblocks/postprocess.py index 22545c8..8a79387 100644 --- a/ogc/bblocks/postprocess.py +++ b/ogc/bblocks/postprocess.py @@ -319,14 +319,15 @@ def do_postprocess(bblock: BuildingBlock, light: bool = False) -> bool: 'imports': imported_registers or [], 'bblocks': output_bblocks, } - if bbr_config.get('name'): - output_register_json['name'] = bbr_config['name'] - elif git_repo_path: + + if 'name' not in additional_metadata and git_repo_path: output_register_json['name'] = git_repo_path.name + if base_url: output_register_json['baseURL'] = base_url if viewer_path: output_register_json['viewerURL'] = urljoin(base_url, viewer_path) + if full_validation_report_url: output_register_json['validationReport'] = full_validation_report_url