zerver/models.py: Change custom field name max length to 40 char.

This commit is contained in:
Yashashvi Dave
2018-08-16 23:42:00 +05:30
committed by Tim Abbott
parent 948190c9ff
commit 868362046b
2 changed files with 22 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
# -*- coding: utf-8 -*-
# Generated by Django 1.11.14 on 2018-08-16 18:10
from __future__ import unicode_literals
from django.db import migrations, models
class Migration(migrations.Migration):
dependencies = [
('zerver', '0182_set_initial_value_is_private_flag'),
]
operations = [
migrations.AlterField(
model_name='customprofilefield',
name='name',
field=models.CharField(max_length=40),
),
]

View File

@@ -2246,9 +2246,10 @@ class CustomProfileField(models.Model):
these fields.
"""
HINT_MAX_LENGTH = 80
NAME_MAX_LENGTH = 40
realm = models.ForeignKey(Realm, on_delete=CASCADE) # type: Realm
name = models.CharField(max_length=100) # type: str
name = models.CharField(max_length=NAME_MAX_LENGTH) # type: str
hint = models.CharField(max_length=HINT_MAX_LENGTH, default='', null=True) # type: Optional[str]
order = models.IntegerField(default=0) # type: int