fix: add blank=true to SlideSubmission.doc (#8688)

Allows admin to save an instance with a null doc reference, which was already permitted.
This commit is contained in:
Jennifer Richards 2025-03-21 15:45:26 +07:00 committed by GitHub
parent 27ea6234a8
commit ed2059a581
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 27 additions and 1 deletions

View file

@ -0,0 +1,26 @@
# Generated by Django 4.2.19 on 2025-03-17 09:37
from django.db import migrations
import django.db.models.deletion
import ietf.utils.models
class Migration(migrations.Migration):
dependencies = [
("doc", "0025_storedobject_storedobject_unique_name_per_store"),
("meeting", "0010_alter_floorplan_image_alter_meetinghost_logo"),
]
operations = [
migrations.AlterField(
model_name="slidesubmission",
name="doc",
field=ietf.utils.models.ForeignKey(
blank=True,
null=True,
on_delete=django.db.models.deletion.SET_NULL,
to="doc.document",
),
),
]

View file

@ -1385,7 +1385,7 @@ class SlideSubmission(models.Model):
apply_to_all = models.BooleanField(default=False)
submitter = ForeignKey(Person)
status = ForeignKey(SlideSubmissionStatusName, null=True, default='pending', on_delete=models.SET_NULL)
doc = ForeignKey(Document, null=True, on_delete=models.SET_NULL)
doc = ForeignKey(Document, blank=True, null=True, on_delete=models.SET_NULL)
def staged_filepath(self):
return os.path.join(settings.SLIDE_STAGING_PATH , self.filename)