From 995c87938f5e5dec5218330900ed5924aef00f6b Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Fri, 21 Feb 2020 23:10:00 +0100 Subject: [PATCH] core: fix default Null causing issues in translation --- .../migrations/0010_auto_20200221_2208.py | 33 +++++++++++++++++++ passbook/core/models.py | 8 ++--- 2 files changed, 37 insertions(+), 4 deletions(-) create mode 100644 passbook/core/migrations/0010_auto_20200221_2208.py diff --git a/passbook/core/migrations/0010_auto_20200221_2208.py b/passbook/core/migrations/0010_auto_20200221_2208.py new file mode 100644 index 000000000..bd7dedef9 --- /dev/null +++ b/passbook/core/migrations/0010_auto_20200221_2208.py @@ -0,0 +1,33 @@ +# Generated by Django 3.0.3 on 2020-02-21 22:08 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ("passbook_core", "0009_auto_20200221_1410"), + ] + + operations = [ + migrations.AlterField( + model_name="application", + name="meta_description", + field=models.TextField(blank=True, default=""), + ), + migrations.AlterField( + model_name="application", + name="meta_icon_url", + field=models.TextField(blank=True, default=""), + ), + migrations.AlterField( + model_name="application", + name="meta_launch_url", + field=models.URLField(blank=True, default=""), + ), + migrations.AlterField( + model_name="application", + name="meta_publisher", + field=models.TextField(blank=True, default=""), + ), + ] diff --git a/passbook/core/models.py b/passbook/core/models.py index e8157f64f..25d33db16 100644 --- a/passbook/core/models.py +++ b/passbook/core/models.py @@ -139,10 +139,10 @@ class Application(ExportModelOperationsMixin("application"), PolicyModel): "Provider", null=True, blank=True, default=None, on_delete=models.SET_DEFAULT ) - meta_launch_url = models.URLField(null=True, blank=True) - meta_icon_url = models.TextField(null=True, blank=True) - meta_description = models.TextField(null=True, blank=True) - meta_publisher = models.TextField(null=True, blank=True) + meta_launch_url = models.URLField(default="", blank=True) + meta_icon_url = models.TextField(default="", blank=True) + meta_description = models.TextField(default="", blank=True) + meta_publisher = models.TextField(default="", blank=True) objects = InheritanceManager()