registration: Enable copying profile settings in production.

Now that we've styled this feature properly, this makes it possible to
copy various user-preferences type profile data in production when
making a new account with the same email address as an existing
account.
This commit is contained in:
Tim Abbott
2018-12-10 15:44:04 -08:00
parent 354109e5e9
commit 14bfa74069

View File

@@ -183,8 +183,6 @@ def access_user_by_id(user_profile: UserProfile, user_id: int,
return target
def get_accounts_for_email(email: str) -> List[Dict[str, Optional[str]]]:
if settings.PRODUCTION: # nocoverage
return []
profiles = UserProfile.objects.select_related('realm').filter(delivery_email__iexact=email.strip(),
is_active=True,
is_bot=False,