Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(users): default numeric columns for users with no walks to 0 #109

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion home/views/web/user.py
Original file line number Diff line number Diff line change
Expand Up @@ -191,9 +191,17 @@ def get_context_data(self, **kwargs):

# Find everyone who signed up during the constest
for acct in get_new_signups(contest, include_testers):

# If this account hasn't performed a daily walk yet:
if acct["email"] not in daily_walks:

# Provide some sane defaults for them
user_stats_container[acct["email"]] = dict(
new_signup=True, account=acct
new_signup=True,
account=acct,
num_dws=0,
dw_steps=0,
dw_distance=0,
)
new_signups_by_zip[acct["zip"]] += 1

Expand Down