mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 09:36:52 +03:00
Fix bugs when name or twitter username are null
This commit is contained in:
parent
85a5e46b92
commit
34f93aaf10
|
@ -81,9 +81,9 @@ class ContributorsJSONFile:
|
|||
def add_contributor(self, user_data):
|
||||
"""Append the contributor data we care about at the end."""
|
||||
contributor_data = {
|
||||
"name": user_data["name"],
|
||||
"name": user_data.get("name", user_data["login"]),
|
||||
"github_login": user_data["login"],
|
||||
"twitter_username": user_data["twitter_username"],
|
||||
"twitter_username": user_data.get("twitter_username", ""),
|
||||
}
|
||||
self.content.append(contributor_data)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user