Skip to content

Commit

Permalink
better check
Browse files Browse the repository at this point in the history
  • Loading branch information
burnout87 committed Oct 8, 2024
1 parent b58dd11 commit d7b36a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion oda_api/gallery_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit d7b36a1

Please sign in to comment.