Skip to content

Commit caa9fa2

Browse files
authored
Admin: allow blank field from admin (#11962)
The field allows null, but we don't allow blank in the admin.
1 parent 6ea4ec6 commit caa9fa2

File tree

2 files changed

+23
-0
lines changed

2 files changed

+23
-0
lines changed
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Generated by Django 4.2.17 on 2025-01-29 15:02
2+
3+
from django.db import migrations, models
4+
import django.db.models.deletion
5+
from django_safemigrate import Safe
6+
7+
8+
class Migration(migrations.Migration):
9+
safe = Safe.always
10+
11+
dependencies = [
12+
('builds', '0059_add_version_date_index'),
13+
('projects', '0143_addons_flyout_position'),
14+
]
15+
16+
operations = [
17+
migrations.AlterField(
18+
model_name='addonsconfig',
19+
name='options_base_version',
20+
field=models.ForeignKey(blank=True, null=True, on_delete=django.db.models.deletion.SET_NULL, to='builds.version', verbose_name='Base version to compare against (eg. DocDiff, File Tree Diff)'),
21+
),
22+
]

readthedocs/projects/models.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,7 @@ class AddonsConfig(TimeStampedModel):
175175
"builds.Version",
176176
verbose_name=_("Base version to compare against (eg. DocDiff, File Tree Diff)"),
177177
null=True,
178+
blank=True,
178179
on_delete=models.SET_NULL,
179180
)
180181

0 commit comments

Comments
 (0)