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

@@ -102,7 +102,8 @@ class MitUser(models.Model):
status = models.IntegerField(default=0)
class Stream(models.Model):
name = models.CharField(max_length=30, db_index=True)
MAX_NAME_LENGTH = 30
name = models.CharField(max_length=MAX_NAME_LENGTH, db_index=True)
realm = models.ForeignKey(Realm, db_index=True)
invite_only = models.NullBooleanField(default=False)