Skip to content

Commit

Permalink
safeguards for missing keywords
Browse files Browse the repository at this point in the history
  • Loading branch information
dansand committed May 20, 2024
1 parent 1f5feb9 commit 3e0b7bb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions .github/scripts/write_repo_contents.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,10 @@

#######
# Add issue keywords as repository topics
keywords = data["scientific_keywords"]
if data["software"]["keywords"]:
keywords += data["software"]["keywords"]
keywords = []
sciencekeywords = issue_dict.get("scientific_keywords", [])
softwarekeywords = issue_dict["software"].get("keywords", [])
keywords += sciencekeywords + softwarekeywords

#ensure keywords have valid format
def sanitize_string(s):
Expand Down

0 comments on commit 3e0b7bb

Please sign in to comment.