Skip to content

Commit

Permalink
Admin: allow blank field from admin (#11962)
Browse files Browse the repository at this point in the history
The field allows null, but we don't allow blank in the admin.
  • Loading branch information
humitos authored Jan 29, 2025
1 parent 6ea4ec6 commit caa9fa2
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
22 changes: 22 additions & 0 deletions readthedocs/projects/migrations/0144_addons_blank_field.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Generated by Django 4.2.17 on 2025-01-29 15:02

from django.db import migrations, models
import django.db.models.deletion
from django_safemigrate import Safe


class Migration(migrations.Migration):
safe = Safe.always

dependencies = [
('builds', '0059_add_version_date_index'),
('projects', '0143_addons_flyout_position'),
]

operations = [
migrations.AlterField(
model_name='addonsconfig',
name='options_base_version',
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)'),
),
]
1 change: 1 addition & 0 deletions readthedocs/projects/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,7 @@ class AddonsConfig(TimeStampedModel):
"builds.Version",
verbose_name=_("Base version to compare against (eg. DocDiff, File Tree Diff)"),
null=True,
blank=True,
on_delete=models.SET_NULL,
)

Expand Down

0 comments on commit caa9fa2

Please sign in to comment.