From 66594154640ab5ab1597e93c4d75ce6f530a77f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20H=C3=A1la?= Date: Thu, 26 Dec 2024 10:46:59 +0100 Subject: [PATCH] Allow blank on tenant links --- tenants/migrations/0007_alter_tenant_links.py | 18 ++++++++++++++++++ tenants/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 tenants/migrations/0007_alter_tenant_links.py diff --git a/tenants/migrations/0007_alter_tenant_links.py b/tenants/migrations/0007_alter_tenant_links.py new file mode 100644 index 0000000..2d891e3 --- /dev/null +++ b/tenants/migrations/0007_alter_tenant_links.py @@ -0,0 +1,18 @@ +# Generated by Django 5.1.4 on 2024-12-25 22:44 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("tenants", "0006_alter_tenant_options"), + ] + + operations = [ + migrations.AlterField( + model_name="tenant", + name="links", + field=models.ManyToManyField(blank=True, to="tenants.link"), + ), + ] diff --git a/tenants/models.py b/tenants/models.py index 796f58a..6ae5013 100644 --- a/tenants/models.py +++ b/tenants/models.py @@ -48,7 +48,7 @@ class Tenant(Model): upload_to="uploads/", validators=[only_png], ) - links = ManyToManyField(Link) + links = ManyToManyField(Link, blank=True) admins = ManyToManyField(get_user_model()) def __str__(self):