Skip to content

Commit

Permalink
Fix missing register name
Browse files Browse the repository at this point in the history
  • Loading branch information
avillar committed Jan 12, 2024
1 parent 7c06ac6 commit d23bcd6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
3 changes: 3 additions & 0 deletions ogc/bblocks/entrypoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 4 additions & 3 deletions ogc/bblocks/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit d23bcd6

Please sign in to comment.