populate_db: Fix broken initial presence data.

Apparently, the initial data just set everyone to "API" in a broken way.
This commit is contained in:
Tim Abbott
2017-02-10 23:50:09 -08:00
parent 2e07533b4e
commit 080182ad17

View File

@@ -186,11 +186,11 @@ class Command(BaseCommand):
if not options["test_suite"]:
# Populate users with some bar data
for user in user_profiles:
status = 1 # type: int
status = UserPresence.ACTIVE # type: int
date = now()
client = get_client("website")
for i in range(3):
client = get_client("API")
if user.full_name[0] <= 'H':
client = get_client("ZulipAndroid")
UserPresence.objects.get_or_create(user_profile=user, client=client, timestamp=date, status=status)
user_profiles_ids = [user_profile.id for user_profile in user_profiles]