Permalink
Browse files

do_add_default_stream: Fix return value if stream exists.

Discovered using mypy static type checker.
  • Loading branch information...
timabbott committed Jan 25, 2016
1 parent ff35557 commit fc02ea9f674e44d99eb12528fceaed64a950bbed
Showing with 1 addition and 1 deletion.
  1. +1 −1 zerver/lib/actions.py
View
@@ -1878,7 +1878,7 @@ def set_default_streams(realm, stream_names):
def do_add_default_stream(realm, stream_name):
stream, _ = create_stream_if_needed(realm, stream_name)
if DefaultStream.objects.filter(realm=realm, stream=stream).exists():
- return
+ return {}
DefaultStream.objects.create(realm=realm, stream=stream)
return {}

0 comments on commit fc02ea9

Please sign in to comment.