Skip to content

Commit

Permalink
Fixed a bug resulting in unspecified acceptance of mail being specifi…
Browse files Browse the repository at this point in the history
…ed as rejection of mail, when updating profile.
  • Loading branch information
helgihg committed Oct 19, 2018
1 parent 36d45fa commit 05cd464
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion gateway/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ def user_to_member_args(user):
'name': user.userprofile.verified_name,
'email': user.email,
'username': user.username,
'email_wanted': 'true' if user.userprofile.email_wanted else 'false',
'added': user.date_joined.strftime('%Y-%m-%d %H:%M:%S'),
'groups': [p.slug for p in user.polities.all()],
}

# If email_wanted is None, then we still don't know the user's preference,
# so we'll say nothing about it.
if user.userprofile.email_wanted is not None:
info.update({'email_wanted': 'true' if user.userprofile.email_wanted else 'false'})

return info


Expand Down

0 comments on commit 05cd464

Please sign in to comment.