mirror of
https://github.com/cookiecutter/cookiecutter-django.git
synced 2024-11-22 17:47:08 +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):
|
def add_contributor(self, user_data):
|
||||||
"""Append the contributor data we care about at the end."""
|
"""Append the contributor data we care about at the end."""
|
||||||
contributor_data = {
|
contributor_data = {
|
||||||
"name": user_data["name"],
|
"name": user_data.get("name", user_data["login"]),
|
||||||
"github_login": 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)
|
self.content.append(contributor_data)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user