diff --git a/zerver/lib/actions.py b/zerver/lib/actions.py index 686afd9660..4cb22c896a 100644 --- a/zerver/lib/actions.py +++ b/zerver/lib/actions.py @@ -1950,7 +1950,7 @@ def _internal_prep_message(realm: Realm, raise RuntimeError("None is not a valid realm for internal_prep_message!") if addressee.is_stream(): - stream = ensure_stream(realm, addressee.stream_name()) + ensure_stream(realm, addressee.stream_name()) try: return check_message(sender, get_client("Internal"), addressee, diff --git a/zerver/tests/test_subs.py b/zerver/tests/test_subs.py index 616a7a7f67..9fe42c8a3f 100644 --- a/zerver/tests/test_subs.py +++ b/zerver/tests/test_subs.py @@ -849,7 +849,7 @@ class DefaultStreamTest(ZulipTestCase): user_profile = self.example_user('hamlet') do_change_is_admin(user_profile, True) stream_name = 'stream ADDED via api' - stream = ensure_stream(user_profile.realm, stream_name) + ensure_stream(user_profile.realm, stream_name) result = self.client_post('/json/default_streams', dict(stream_name=stream_name)) self.assert_json_success(result) self.assertTrue(stream_name in self.get_default_stream_names(user_profile.realm))