populate_analytics_db: Replace intermediate list with generator.

Followup to commit ab120a03bc (#16265).

Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
Anders Kaseorg 2020-09-02 18:34:11 -07:00 committed by Anders Kaseorg
parent d9860d40a6
commit b84260014a
1 changed files with 2 additions and 2 deletions

View File

@ -99,10 +99,10 @@ class Command(BaseCommand):
id_args = {'stream': stream, 'realm': realm}
for subgroup, values in fixture_data.items():
table.objects.bulk_create([
table.objects.bulk_create(
table(property=stat.property, subgroup=subgroup, end_time=end_time,
value=value, **id_args)
for end_time, value in zip(end_times, values) if value != 0])
for end_time, value in zip(end_times, values) if value != 0)
stat = COUNT_STATS['1day_actives::day']
realm_data: Mapping[Optional[str], List[int]] = {