From b7bfc03a5d34075cb4c2d8fd88d4077d862cce75 Mon Sep 17 00:00:00 2001 From: Eric Holscher Date: Tue, 2 Jun 2020 14:16:19 -0700 Subject: [PATCH] Allow `blank=True` for URLConf MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This was causing issues in the admin where we couldn’t save the Project because it was blank. --- .../projects/migrations/0054_urlconf_blank.py | 18 ++++++++++++++++++ readthedocs/projects/models.py | 1 + 2 files changed, 19 insertions(+) create mode 100644 readthedocs/projects/migrations/0054_urlconf_blank.py diff --git a/readthedocs/projects/migrations/0054_urlconf_blank.py b/readthedocs/projects/migrations/0054_urlconf_blank.py new file mode 100644 index 00000000000..90caf4f33ba --- /dev/null +++ b/readthedocs/projects/migrations/0054_urlconf_blank.py @@ -0,0 +1,18 @@ +# Generated by Django 2.2.10 on 2020-06-02 21:17 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('projects', '0053_make_external_builds_field_not_null'), + ] + + operations = [ + migrations.AlterField( + model_name='project', + name='urlconf', + field=models.CharField(blank=True, default=None, help_text='Supports the following keys: $language, $version, $subproject, $filename. An example: `$language/$version/$filename`.', max_length=255, null=True, verbose_name='Documentation URL Configuration'), + ), + ] diff --git a/readthedocs/projects/models.py b/readthedocs/projects/models.py index 0aa4cb309f7..ed5c1163bbd 100644 --- a/readthedocs/projects/models.py +++ b/readthedocs/projects/models.py @@ -208,6 +208,7 @@ class Project(models.Model): _('Documentation URL Configuration'), max_length=255, default=None, + blank=True, null=True, help_text=_( 'Supports the following keys: $language, $version, $subproject, $filename. '