From d7b36a15819c1011277a4d7fbfa5ab4f5bf57223 Mon Sep 17 00:00:00 2001 From: burnout87 Date: Tue, 8 Oct 2024 20:26:53 +0200 Subject: [PATCH 1/3] better check --- oda_api/gallery_api.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oda_api/gallery_api.py b/oda_api/gallery_api.py index 1a761c09..d2a4a87d 100644 --- a/oda_api/gallery_api.py +++ b/oda_api/gallery_api.py @@ -669,7 +669,7 @@ def post_data_product_to_gallery(self, src_name_list = src_name_arg for src_name in src_name_list: - resolved_source = False + resolved_source = True entity_portal_link = None object_ids = None object_type = None @@ -681,6 +681,7 @@ def post_data_product_to_gallery(self, msg = '' if 'message' in resolved_obj: if 'could not be resolved' in resolved_obj['message']: + resolved_source = False msg = f'\nSource {src_name} could not be validated' elif 'successfully resolved' in resolved_obj['message']: resolved_source = True @@ -710,6 +711,7 @@ def post_data_product_to_gallery(self, object_ids = resolved_obj['object_ids'] else: logger.warning(f"{src_name} could not be validated") + resolved_source = False if not resolved_source and not force_insert_not_valid_new_source: # a source won't be added From 79596e8f205143d220ed7434fa8ab8f2c23764ed Mon Sep 17 00:00:00 2001 From: burnout87 Date: Wed, 9 Oct 2024 10:40:12 +0200 Subject: [PATCH 2/3] extended test --- tests/test_drupal.py | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/test_drupal.py b/tests/test_drupal.py index d730c268..ae2a534e 100644 --- a/tests/test_drupal.py +++ b/tests/test_drupal.py @@ -1006,6 +1006,7 @@ def test_resolve_source(dispatcher_api_with_gallery, dispatcher_test_conf_with_g assert 'object_ids' in resolved_obj assert 'RA' in resolved_obj assert 'DEC' in resolved_obj + assert 'message' in resolved_obj quoted_source_name = urllib.parse.quote(source_name.strip()) From 6802b34ab499a3452f291a78c0720dd6f7cd09e9 Mon Sep 17 00:00:00 2001 From: burnout87 Date: Thu, 10 Oct 2024 13:59:57 +0200 Subject: [PATCH 3/3] testing vale version --- .github/workflows/prose.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/prose.yml b/.github/workflows/prose.yml index a8607c8d..b33f2e1c 100644 --- a/.github/workflows/prose.yml +++ b/.github/workflows/prose.yml @@ -15,7 +15,7 @@ jobs: with: # Optional - version: 2.17.0 + version: 2.29.2 # Optional styles: |