Skip to content

Commit

Permalink
Merge pull request oda-hub#715 from oda-hub/missing-field-name-resolu…
Browse files Browse the repository at this point in the history
…tion

Missing field name resolution
  • Loading branch information
burnout87 authored Oct 11, 2024
2 parents 1b0c79e + ea3c446 commit a4068ea
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions cdci_data_analysis/analysis/drupal_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1559,6 +1559,7 @@ def resolve_name(local_name_resolver_url: str, external_name_resolver_url: str,
resolved_obj['RA'] = float(ra_tag.text)
resolved_obj['DEC'] = float(dec_tag.text)
resolved_obj['entity_portal_link'] = entities_portal_url.format(quoted_name)
resolved_obj['message'] = f'{name} successfully resolved'

try:
Simbad.add_votable_fields("otype")
Expand Down
2 changes: 2 additions & 0 deletions tests/test_server_basic.py
Original file line number Diff line number Diff line change
Expand Up @@ -2737,6 +2737,7 @@ def test_source_resolver(dispatcher_live_fixture_with_gallery, dispatcher_test_c
assert 'entity_portal_link' in resolved_obj
assert 'object_ids' in resolved_obj
assert 'object_type' in resolved_obj
assert 'message' in resolved_obj

assert resolved_obj['name'] == source_to_resolve.replace('_', ' ')
assert resolved_obj['entity_portal_link'] == dispatcher_test_conf_with_gallery["product_gallery_options"]["entities_portal_url"]\
Expand Down Expand Up @@ -2784,6 +2785,7 @@ def test_source_resolver_invalid_local_resolver(dispatcher_live_fixture_with_gal
assert 'entity_portal_link' in resolved_obj
assert 'object_ids' in resolved_obj
assert 'object_type' in resolved_obj
assert 'message' in resolved_obj

assert resolved_obj['name'] == source_to_resolve.replace('_', ' ')
assert resolved_obj['entity_portal_link'] == dispatcher_test_conf_with_gallery_invalid_local_resolver["product_gallery_options"]["entities_portal_url"]\
Expand Down

0 comments on commit a4068ea

Please sign in to comment.