0
0
mirror of https://github.com/wagtail/wagtail.git synced 2024-12-01 11:41:20 +01:00

Remove null=True from WorkflowState's content_type and base_content_type fields

This commit is contained in:
Sage Abdullah 2022-12-13 15:51:10 +00:00
parent 90a3813418
commit ec5bf4e671
No known key found for this signature in database
GPG Key ID: EB1A33CC51CC0217
2 changed files with 35 additions and 2 deletions

View File

@ -0,0 +1,33 @@
# Generated by Django 4.2.dev20221212151407 on 2022-12-12 15:38
from django.db import migrations, models
import django.db.models.deletion
class Migration(migrations.Migration):
dependencies = [
("contenttypes", "0002_remove_content_type_name"),
("wagtailcore", "0081_populate_workflowstate_content_type"),
]
operations = [
migrations.AlterField(
model_name="workflowstate",
name="base_content_type",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="+",
to="contenttypes.contenttype",
),
),
migrations.AlterField(
model_name="workflowstate",
name="content_type",
field=models.ForeignKey(
on_delete=django.db.models.deletion.CASCADE,
related_name="+",
to="contenttypes.contenttype",
),
),
]

View File

@ -3855,10 +3855,10 @@ class WorkflowState(models.Model):
)
content_type = models.ForeignKey(
ContentType, on_delete=models.CASCADE, related_name="+", null=True
ContentType, on_delete=models.CASCADE, related_name="+"
)
base_content_type = models.ForeignKey(
ContentType, on_delete=models.CASCADE, related_name="+", null=True
ContentType, on_delete=models.CASCADE, related_name="+"
)
object_id = models.CharField(max_length=255, verbose_name=_("object id"))