mirror of
https://github.com/zulip/zulip.git
synced 2025-11-09 16:37:23 +00:00
populate_db: Fix initialization of history_public_to_subscribers.
This was being incorrectly not initialized properly in the test suite, because we neglected to update the bulk_create code path for creating streams.
This commit is contained in:
@@ -65,11 +65,17 @@ def bulk_create_streams(realm: Realm,
|
||||
.values_list('name', flat=True)])
|
||||
streams_to_create = [] # type: List[Stream]
|
||||
for name, options in stream_dict.items():
|
||||
if 'history_public_to_subscribers' not in options:
|
||||
options['history_public_to_subscribers'] = (
|
||||
not options["invite_only"] and not realm.is_zephyr_mirror_realm)
|
||||
if name.lower() not in existing_streams:
|
||||
streams_to_create.append(
|
||||
Stream(
|
||||
realm=realm, name=name, description=options["description"],
|
||||
realm=realm,
|
||||
name=name,
|
||||
description=options["description"],
|
||||
invite_only=options["invite_only"],
|
||||
history_public_to_subscribers=options["history_public_to_subscribers"],
|
||||
is_in_zephyr_realm=realm.is_zephyr_mirror_realm,
|
||||
)
|
||||
)
|
||||
|
||||
@@ -103,6 +103,7 @@ def is_template_database_current(
|
||||
if check_files is None:
|
||||
check_files = [
|
||||
'zilencer/management/commands/populate_db.py',
|
||||
'zerver/lib/bulk_create.py',
|
||||
'zerver/lib/generate_test_data.py',
|
||||
'tools/setup/postgres-init-test-db',
|
||||
'tools/setup/postgres-init-dev-db',
|
||||
|
||||
Reference in New Issue
Block a user