feedback from review
This commit is contained in:
Родитель
7f9f1569ea
Коммит
65bfd0f9de
|
@ -24,7 +24,5 @@ class Migration(migrations.Migration):
|
|||
]
|
||||
|
||||
operations = [
|
||||
migrations.RunPython(
|
||||
match_profile_isactive_to_user_isactive
|
||||
),
|
||||
migrations.RunPython(code=match_profile_isactive_to_user_isactive, reverse_code=migrations.RunPython.noop)
|
||||
]
|
||||
|
|
|
@ -111,6 +111,9 @@ class PulseSocialAccountAdapter(DefaultSocialAccountAdapter):
|
|||
try:
|
||||
UserProfile.objects.get(related_user=user)
|
||||
except UserProfile.DoesNotExist:
|
||||
|
||||
# Is_active is False by default, so we can hide this
|
||||
# users profile and entries, until set to active by a moderator.
|
||||
profile = UserProfile.objects.create(is_active=False)
|
||||
user.profile = profile
|
||||
user.save()
|
||||
|
|
|
@ -22,6 +22,8 @@ class EmailUserManager(BaseUserManager):
|
|||
|
||||
# Ensure that new users get a user profile associated
|
||||
# with them, even though it'll be empty by default.
|
||||
# Is_active is set to False, so we can hide this
|
||||
# user's profile and entries, until set to active by a moderator.
|
||||
profile = UserProfile.objects.create(is_active=False)
|
||||
user = self.model(
|
||||
email=email,
|
||||
|
|
Загрузка…
Ссылка в новой задаче