Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Missing Service Descriptions #456

Merged
merged 2 commits into from
May 26, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion Core/LAMBDA/viz_functions/viz_publish_service/lambda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,13 +85,22 @@ def lambda_handler(event, context):
raise e
new_item.update(item_properties={'snippet': summary, 'description': description,
'tags': tags, 'accessInformation': credits})

print(f"---> Updated {service_name} descriptions, tags, and credits in Portal.")
if public_service:
new_item.share(org=True, everyone=True)
print(f"---> Updated {service_name} sharing to org and public in Portal.")
else:
new_item.share(org=True)
print(f"---> Updated {service_name} sharing to org in Portal.")

# Ensuring that the description for the service matches the iteminfo
matching_service = matching_services[0]
if not matching_service.properties['description']:
print("Updating service property description to match iteminfo")
service_properties = matching_service.properties
service_properties['description'] = matching_service.iteminformation.properties['description']
matching_service.edit(dict(service_properties))

# Create publish flag file
tmp_published_file = f"/tmp/{service_name}"
Expand Down Expand Up @@ -160,4 +169,4 @@ def get_service_metadata(folder, service_name):
service_stream = open(yml_path, 'r')
service_metadata = yaml.safe_load(service_stream)

return service_metadata
return service_metadata