Truncate the tutorial stream name to fit the DB max stream name length.

(imported from commit e267656337f97d3ea14e14e957a405cf4fd2d06c)
This commit is contained in:
Jessica McKellar
2013-03-19 20:16:41 -04:00
parent 6263c9ba1e
commit 37e58b613d
4 changed files with 7 additions and 4 deletions

View File

@@ -279,7 +279,7 @@ def check_send_message(sender, client, message_type_name, message_to,
stream_name = message_to[0].strip()
if stream_name == "":
return "Stream can't be empty"
if len(stream_name) > 30:
if len(stream_name) > Stream.MAX_NAME_LENGTH:
return "Stream name too long"
if not valid_stream_name(stream_name):
return "Invalid stream name"