From e74fa361282d56d9624cc23894d1ce9ee0a75e86 Mon Sep 17 00:00:00 2001 From: Dirk Jahnke Date: Wed, 13 Apr 2022 17:23:21 +0200 Subject: [PATCH] Fix: made brand nullable --- .../migrations/0004_alter_gtinproduct_brand.py | 18 ++++++++++++++++++ asset/models.py | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) create mode 100644 asset/migrations/0004_alter_gtinproduct_brand.py diff --git a/asset/migrations/0004_alter_gtinproduct_brand.py b/asset/migrations/0004_alter_gtinproduct_brand.py new file mode 100644 index 0000000..87345c3 --- /dev/null +++ b/asset/migrations/0004_alter_gtinproduct_brand.py @@ -0,0 +1,18 @@ +# Generated by Django 4.0.3 on 2022-04-13 14:58 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('asset', '0003_gtinproduct'), + ] + + operations = [ + migrations.AlterField( + model_name='gtinproduct', + name='brand', + field=models.CharField(blank=True, max_length=40, null=True), + ), + ] diff --git a/asset/models.py b/asset/models.py index ab40d8f..0bd5d95 100644 --- a/asset/models.py +++ b/asset/models.py @@ -33,7 +33,7 @@ class GtinProduct(models.Model): api_request = models.CharField(max_length=250) api_response = models.CharField(max_length=4096) name = models.CharField(max_length=200, blank=True) - brand = models.CharField(max_length=40, blank=True) + brand = models.CharField(max_length=40, blank=True, null=True) created_ts = models.DateTimeField('datetime created', auto_now_add=True) changed_ts = models.DateTimeField('datetime updated', auto_now=True)