From e48ae6a39d0101a2b3ccc740bc419cf35e8e03fb Mon Sep 17 00:00:00 2001 From: PCoder Date: Wed, 25 Dec 2019 08:31:40 +0530 Subject: [PATCH] Update migration to make vat_number non mandatory --- ...007_auto_20191221_0319.py => 0007_auto_20191225_0300.py} | 6 +++--- utils/models.py | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) rename utils/migrations/{0007_auto_20191221_0319.py => 0007_auto_20191225_0300.py} (98%) diff --git a/utils/migrations/0007_auto_20191221_0319.py b/utils/migrations/0007_auto_20191225_0300.py similarity index 98% rename from utils/migrations/0007_auto_20191221_0319.py rename to utils/migrations/0007_auto_20191225_0300.py index b9fe9b6d..72f5c836 100644 --- a/utils/migrations/0007_auto_20191221_0319.py +++ b/utils/migrations/0007_auto_20191225_0300.py @@ -1,5 +1,5 @@ # -*- coding: utf-8 -*- -# Generated by Django 1.9.4 on 2019-12-21 03:19 +# Generated by Django 1.9.4 on 2019-12-25 03:00 from __future__ import unicode_literals from django.db import migrations, models @@ -16,12 +16,12 @@ class Migration(migrations.Migration): migrations.AddField( model_name='billingaddress', name='vat_number', - field=models.CharField(default='', max_length=100), + field=models.CharField(blank=True, default='', max_length=100), ), migrations.AddField( model_name='userbillingaddress', name='vat_number', - field=models.CharField(default='', max_length=100), + field=models.CharField(blank=True, default='', max_length=100), ), migrations.AlterField( model_name='billingaddress', diff --git a/utils/models.py b/utils/models.py index 0084ddd4..a10aad92 100644 --- a/utils/models.py +++ b/utils/models.py @@ -13,7 +13,7 @@ class BaseBillingAddress(models.Model): city = models.CharField(max_length=50) postal_code = models.CharField(max_length=50) country = CountryField() - vat_number = models.CharField(max_length=100, default="") + vat_number = models.CharField(max_length=100, default="", blank=True) class Meta: abstract = True