Skip to content

Commit

Permalink
Don’t show email header when email addresses haven’t synced yet.
Browse files Browse the repository at this point in the history
  • Loading branch information
jezdez committed Apr 18, 2019
1 parent 3ea61a6 commit d531b6f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion jazzband/members/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def access_token(self):
oauth = self.oauths.scalar()
if oauth is None:
return
return oauth.token.get('access_token', None)
return oauth.token.get("access_token", None)

@property
def has_consented(self):
Expand Down
5 changes: 4 additions & 1 deletion jazzband/templates/account/dashboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,19 @@ <h3>
{% endif %}
</p>
#}
{% set email_addresses = current_user.email_addresses.all() %}
{% if email_addresses %}
<h4>Email addresses</h4>
<p>
Here are the email addresses we fetched using the GitHub API to make sure
you have verified at least one:
<ul>
{% for email in current_user.email_addresses.all() %}
{% for email in email_addresses %}
<li>{{ email.email }}{% if email.primary %} (primary){% endif %}</li>
{% endfor %}
</ul>
</p>
{% endif %}
<h4>What's next?</h4>
<p>
You may be wondering what you can do as member of the Jazzband.
Expand Down

0 comments on commit d531b6f

Please sign in to comment.