Skip to content

Commit

Permalink
Remove outdated aliases to new steram name
Browse files Browse the repository at this point in the history
  • Loading branch information
J M committed May 11, 2017
1 parent f15850a commit 48d07b2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions zerver/lib/actions.py
Original file line number Diff line number Diff line change
Expand Up @@ -2099,6 +2099,7 @@ def do_change_stream_invite_only(stream, invite_only):
def do_rename_stream(stream, new_name, log=True):
# type: (Stream, Text, bool) -> Dict[str, Text]
old_name = stream.name
StreamAlias.objects.filter(old_name=new_name).delete()
StreamAlias(old_name=old_name, stream=stream).save()
stream.name = new_name
stream.save(update_fields=["name"])
Expand Down

0 comments on commit 48d07b2

Please sign in to comment.