Make populate_db set the is_bot flag on bot accounts.

(imported from commit 93a507faa2b19fde05376fd73ed3a65149cfce68)
This commit is contained in:
Kevin Mehall
2013-09-17 17:59:08 -04:00
parent e73e3d1bac
commit 63cff6eb71
2 changed files with 6 additions and 6 deletions

View File

@@ -15,7 +15,7 @@ def bulk_create_realms(realm_list):
existing_realms.add(domain)
Realm.objects.bulk_create(realms_to_create)
def bulk_create_users(realms, users_raw):
def bulk_create_users(realms, users_raw, bot=False):
"""
Creates and saves a UserProfile with the given email.
Has some code based off of UserManage.create_user, but doesn't .save()
@@ -33,7 +33,7 @@ def bulk_create_users(realms, users_raw):
for (email, full_name, short_name, active) in users:
domain = email_to_domain(email)
profile = create_user_profile(realms[domain], email,
initial_password(email), active, False,
initial_password(email), active, bot,
full_name, short_name, None)
profiles_to_create.append(profile)
UserProfile.objects.bulk_create(profiles_to_create)