mirror of
https://github.com/zulip/zulip.git
synced 2026-07-15 21:03:26 +08:00
rename_stream: Move stripping of whitespace to view.
This commit is contained in:
parent
4ad1fadab0
commit
ab1e9f2b97
@ -2059,8 +2059,8 @@ def do_change_stream_invite_only(stream, invite_only):
|
||||
|
||||
def do_rename_stream(realm, old_name, new_name, log=True):
|
||||
# type: (Realm, Text, Text, bool) -> Dict[str, Text]
|
||||
old_name = old_name.strip()
|
||||
new_name = new_name.strip()
|
||||
old_name = old_name
|
||||
new_name = new_name
|
||||
|
||||
stream = get_stream(old_name, realm)
|
||||
|
||||
|
||||
@ -95,6 +95,7 @@ def update_stream_backend(request, user_profile, stream_id,
|
||||
if description is not None:
|
||||
do_change_stream_description(user_profile.realm, stream.name, description)
|
||||
if new_name is not None:
|
||||
new_name = new_name.strip()
|
||||
do_rename_stream(user_profile.realm, stream.name, new_name)
|
||||
if is_private is not None:
|
||||
do_change_stream_invite_only(stream, is_private)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user