From 66cb2975873c256f55ea4ecbb1edef6fae839bee Mon Sep 17 00:00:00 2001 From: pablohashescobar Date: Wed, 8 Nov 2023 19:01:45 +0530 Subject: [PATCH] dev: update instance configuration model to take null and empty values --- .../0003_alter_instanceconfiguration_value.py | 18 ++++++++++++++++++ apiserver/plane/license/models/instance.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 apiserver/plane/license/migrations/0003_alter_instanceconfiguration_value.py diff --git a/apiserver/plane/license/migrations/0003_alter_instanceconfiguration_value.py b/apiserver/plane/license/migrations/0003_alter_instanceconfiguration_value.py new file mode 100644 index 000000000..b9ded715c --- /dev/null +++ b/apiserver/plane/license/migrations/0003_alter_instanceconfiguration_value.py @@ -0,0 +1,18 @@ +# Generated by Django 4.2.5 on 2023-11-08 13:30 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('license', '0002_instanceconfiguration'), + ] + + operations = [ + migrations.AlterField( + model_name='instanceconfiguration', + name='value', + field=models.TextField(blank=True, null=True), + ), + ] diff --git a/apiserver/plane/license/models/instance.py b/apiserver/plane/license/models/instance.py index 8629390cc..627a6ea92 100644 --- a/apiserver/plane/license/models/instance.py +++ b/apiserver/plane/license/models/instance.py @@ -32,7 +32,7 @@ class Instance(BaseModel): class InstanceConfiguration(AuditModel): key = models.CharField(max_length=100, unique=True) - value = models.TextField() + value = models.TextField(null=True, blank=True) class Meta: verbose_name = "Instance Configuration"