diff --git a/github_to_sqlite/utils.py b/github_to_sqlite/utils.py index bae4ac6..c7d78d7 100644 --- a/github_to_sqlite/utils.py +++ b/github_to_sqlite/utils.py @@ -223,6 +223,11 @@ def save_pull_requests(db, pull_requests, repo): def save_user(db, user): + # Under some conditions, GitHub caches removed repositories with + # stars and ends up leaving dangling `None` user references. + if user is None: + return None + # Remove all url fields except avatar_url and html_url to_save = { key: value