populate_db: Change enter_sends to True for development users.

Fixes #4355.
This commit is contained in:
Rishi Gupta 2017-03-29 14:21:44 -07:00 committed by showell
parent 9aa77e491e
commit 754b547e88
2 changed files with 6 additions and 3 deletions

View File

@ -21,7 +21,8 @@ def bulk_create_users(realm, users_raw, bot_type=None, tos_version=None):
profile = create_user_profile(realm, email,
initial_password(email), active, bot_type,
full_name, short_name, None, False, tos_version,
tutorial_status=UserProfile.TUTORIAL_FINISHED)
tutorial_status=UserProfile.TUTORIAL_FINISHED,
enter_sends=True)
profiles_to_create.append(profile)
UserProfile.objects.bulk_create(profiles_to_create)

View File

@ -26,8 +26,9 @@ def random_api_key():
# Recipient objects
def create_user_profile(realm, email, password, active, bot_type, full_name,
short_name, bot_owner, is_mirror_dummy, tos_version,
tutorial_status=UserProfile.TUTORIAL_WAITING):
# type: (Realm, Text, Optional[Text], bool, Optional[int], Text, Text, Optional[UserProfile], bool, Optional[Text], Optional[Text]) -> UserProfile
tutorial_status=UserProfile.TUTORIAL_WAITING,
enter_sends=False):
# type: (Realm, Text, Optional[Text], bool, Optional[int], Text, Text, Optional[UserProfile], bool, Optional[Text], Optional[Text], bool) -> UserProfile
now = timezone.now()
email = UserManager.normalize_email(email)
@ -38,6 +39,7 @@ def create_user_profile(realm, email, password, active, bot_type, full_name,
bot_owner=bot_owner, is_mirror_dummy=is_mirror_dummy,
tos_version=tos_version,
tutorial_status=tutorial_status,
enter_sends=enter_sends,
onboarding_steps=ujson.dumps([]),
default_language=realm.default_language)