Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
list_to_streams: Use simpler if statement flow.
Tim Abbotteb62693d2677
diff --git a/zerver/lib/streams.py b/zerver/lib/streams.pyindex b4a89d5faf8..238c1c5d5c4 100644--- a/zerver/lib/streams.py+++ b/zerver/lib/streams.py@@ -665,13 +665,15 @@ def list_to_streams(# Guest users case will not be handled here as it will be# handled by the decorator in add_subscriptions_backend.raise JsonableError(_("Insufficient permission"))- elif not autocreate:++ if not autocreate:raise JsonableError(_("Stream(s) ({}) do not exist").format(", ".join(stream_dict["name"] for stream_dict in missing_stream_dicts),))- elif message_retention_days_not_none:++ if message_retention_days_not_none:if not user_profile.is_realm_owner:raise OrganizationOwnerRequired()