Skip to content

Commit 36784bf

Browse files
benjaomingericholscher
authored andcommitted
Migration edit: Allow null values in delisted
1 parent 8900dc2 commit 36784bf

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

readthedocs/projects/migrations/0096_add_project_delisted.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Generated by Django 3.2.18 on 2023-02-24 16:02
1+
# Generated by Django 3.2.18 on 2023-02-28 16:27
22

33
from django.db import migrations, models
44

@@ -16,6 +16,7 @@ class Migration(migrations.Migration):
1616
field=models.BooleanField(
1717
default=False,
1818
help_text="Delisting a project removes it from Read the Docs search indexing and asks external search engines to remove it via robots.txt",
19+
null=True,
1920
verbose_name="Delisted",
2021
),
2122
),
@@ -25,6 +26,7 @@ class Migration(migrations.Migration):
2526
field=models.BooleanField(
2627
default=False,
2728
help_text="Delisting a project removes it from Read the Docs search indexing and asks external search engines to remove it via robots.txt",
29+
null=True,
2830
verbose_name="Delisted",
2931
),
3032
),

readthedocs/projects/models.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,11 @@ class Project(models.Model):
362362

363363
skip = models.BooleanField(_("Skip (disable) building this project"), default=False)
364364

365+
# null=True can be removed in a later migration
366+
# be careful if adding new queries on this, .filter(delisted=False) does not work
367+
# but .exclude(delisted=True) does!
365368
delisted = models.BooleanField(
369+
null=True,
366370
default=False,
367371
verbose_name=_("Delisted"),
368372
help_text=_(

0 commit comments

Comments
 (0)