Skip to content

Commit

Permalink
fix: fix retrieval of Github license
Browse files Browse the repository at this point in the history
  • Loading branch information
IgnacioHeredia committed Aug 20, 2024
1 parent 9129dbd commit d8a3161
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ai4papi/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def get_github_info(owner, repo):
repo_data['updated_at'],
"%Y-%m-%dT%H:%M:%SZ",
).date().strftime("%Y-%m-%d")
out['license'] = repo_data['license']['spdx_id']
out['license'] = (repo_data['license'] or {}).get('spdx_id', '')
# out['stars'] = repo_data['stargazers_count']
else:
print(f'Failed to parse Github repo: {owner}/{repo}')
Expand Down

0 comments on commit d8a3161

Please sign in to comment.