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

Hotfix: Crashing archive_database_update #1425

Merged
merged 4 commits into from
Jan 10, 2024
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
10 changes: 8 additions & 2 deletions jwql/website/apps/jwql/data_containers.py
Original file line number Diff line number Diff line change
Expand Up @@ -302,8 +302,14 @@ def create_archived_proposals_context(inst):
proposal_obs_times = [observation.obsstart for observation in prop_entries]
thumb_obs_time.append(max(proposal_obs_times))

# Add category type to list based on proposal number
cat_types.append(proposals_by_category[int(proposal_num)])
try:
# Add category type to list based on proposal number
cat_types.append(proposals_by_category[int(proposal_num)])
except KeyError:
cat_types.append("MISSING")
logging.error(f"""Unable to populate proposals by category in MAST for proposal number {proposal_num}
Proposal number {proposal_num} will have 'MISSING' category type associated with it
""")

thumbnails_dict['proposals'] = proposal_nums
thumbnails_dict['thumbnail_paths'] = thumbnail_paths
Expand Down