Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

models: Make realm.name no longer nullable.

Tim Abbott517c2ed39d5c
diff --git a/zerver/migrations/0345_alter_realm_name.py b/zerver/migrations/0345_alter_realm_name.py
new file mode 100644
index 00000000000..2d39d028c4b
--- /dev/null
+++ b/zerver/migrations/0345_alter_realm_name.py
@@ -0,0 +1,18 @@
+# Generated by Django 3.2.6 on 2021-09-08 22:35
+
+from django.db import migrations, models
+
+
+class Migration(migrations.Migration):
+
+ dependencies = [
+ ("zerver", "0344_alter_emojiset_default_value"),
+ ]
+
+ operations = [
+ migrations.AlterField(
+ model_name="realm",
+ name="name",
+ field=models.CharField(max_length=40),
+ ),
+ ]
diff --git a/zerver/models.py b/zerver/models.py
index cfa323c35b3..8e866052e1e 100644
--- a/zerver/models.py
+++ b/zerver/models.py
@@ -207,7 +207,7 @@ class Realm(models.Model):
id: int = models.AutoField(auto_created=True, primary_key=True, verbose_name="ID")
# User-visible display name and description used on e.g. the organization homepage
- name: Optional[str] = models.CharField(max_length=MAX_REALM_NAME_LENGTH, null=True)
+ name: str = models.CharField(max_length=MAX_REALM_NAME_LENGTH)
description: str = models.TextField(default="")
# A short, identifier-like name for the organization. Used in subdomains;